Core/MMAPS: Fix invisible wall issue in MMAPS.

Fix invisible wall issues in MMAPS caused by tile connections not being extracted correctly.
This reverts aa645683b8 and restores an old version of recastnavigation, most likely https://github.com/memononen/recastnavigation/commit/1be9de72d87dcfdecf6bea30f5461745f7d7afe6 .

Re-extracting MMAPS is required.
This commit is contained in:
jackpoz committed 2014-02-13 22:19:56 +01:00
1 parent b9db1ab24e
commit 006d72a828
20 files changed
+809 -2092

No files matched your search

+12 -3
View File
@@ -36,7 +36,7 @@ namespace DisableMgr
}
#define MMAP_MAGIC 0x4d4d4150 // 'MMAP'
#define MMAP_VERSION 4
#define MMAP_VERSION 3
struct MmapTileHeader
{
@@ -701,6 +701,14 @@ namespace MMAP
delete[] dmmerge;
delete[] tiles;
// remove padding for extraction
for (int i = 0; i < iv.polyMesh->nverts; ++i)
{
unsigned short* v = &iv.polyMesh->verts[i * 3];
v[0] -= (unsigned short)config.borderSize;
v[2] -= (unsigned short)config.borderSize;
}
// set polygons as walkable
// TODO: special flags for DYNAMIC polygons, ie surfaces that can be turned on and off
for (int i = 0; i < iv.polyMesh->npolys; ++i)
@@ -739,8 +747,9 @@ namespace MMAP
rcVcopy(params.bmax, bmax);
params.cs = config.cs;
params.ch = config.ch;
params.tileLayer = 0;
params.buildBvTree = true;
params.tileSize = VERTEX_PER_MAP;
/*params.tileLayer = 0;
params.buildBvTree = true;*/
// will hold final navmesh
unsigned char* navData = NULL;