stevefsp / critterai

Archive of CAINav Project (Inactive)
MIT License
127 stars 75 forks source link

The rcnNavMeshSetHeader struct is incorrect #24

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a navmesh
2. Get the byte content via GetSerializedMesh
3. Write the content to a file
4. Try to open the navmesh with RecastDemo

What is the expected output? What do you see instead?
RecastDemo should open the navmesh and show it. Instead it refuses to load the 
file.

Please provide any additional information below.
The version property of the rcnNavMeshSetHeader struct in the 
DetourNavMeshBuildEx.cpp is a long. It should instead be an int and another int 
should be prepended to it with the value ('M' << 24 | 'S' << 16 | 'E' << 8 | 
'T').

Original issue reported on code.google.com by sebmaste...@gmail.com on 24 Apr 2012 at 4:51

GoogleCodeExporter commented 9 years ago
I'm sorry, I didn't even try the most recent trunk version and tested with v0.3 
all the time :/.

Original comment by sebmaste...@gmail.com on 24 Apr 2012 at 5:31

GoogleCodeExporter commented 9 years ago
I just downloaded from trunk and the bug in the struct is still there.

Original comment by sebmaste...@gmail.com on 24 Apr 2012 at 6:50

GoogleCodeExporter commented 9 years ago
I'm going to categorize this to an enhancement request.

That portion of the code has to do with navigation mesh serialization, and 
Recast Navigation doesn't have a standard serialization format.  (Serialization 
only exists as part of the demo/sample code.)

Having said that, I can't remember why I decided not to match my serialization 
code to the demo code.  So I'll look at it again to see if I should.  It would 
be kind of nice for .NET-only users to be able to view CAINav navigation meshes 
in the Recast Demo.

The argument against the change is that it may require that I break backward 
compatibility, since it changes the serialization versioning mechanism.  That 
forces current users to re-serialize their navigation meshes.  I'm not really 
keen on that.

Original comment by steve...@gmail.com on 24 Apr 2012 at 11:39

GoogleCodeExporter commented 9 years ago
To avoid the versioning issue it may be good to fix the struct and set 
magic=1/version=0 by default and provide the ability to change this either by 
conditional compilation, a global setting or even by making the struct writable 
in C#.

Original comment by sebmaste...@gmail.com on 25 Apr 2012 at 5:50