mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: fix compile error caused by missed version checks
This commit is contained in:
parent
1c637230d5
commit
2a45ced5f4
@ -447,7 +447,9 @@ bool Editor_TileMesh::handleBuild()
|
|||||||
params.polyGroupCount = 0;
|
params.polyGroupCount = 0;
|
||||||
params.traversalTableSize = 0;
|
params.traversalTableSize = 0;
|
||||||
params.traversalTableCount = NavMesh_GetTraversalTableCountForNavMeshType(m_selectedNavMeshType);
|
params.traversalTableCount = NavMesh_GetTraversalTableCountForNavMeshType(m_selectedNavMeshType);
|
||||||
|
#if DT_NAVMESH_SET_VERSION >= 8
|
||||||
params.magicDataCount = 0;
|
params.magicDataCount = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
dtStatus status;
|
dtStatus status;
|
||||||
|
|
||||||
|
@ -202,6 +202,10 @@ static void drawTileCells(duDebugDraw* dd, const dtMeshTile* tile, const float*
|
|||||||
const dtCell& probe = tile->cells[i];
|
const dtCell& probe = tile->cells[i];
|
||||||
duDebugDrawCross(dd, probe.pos[0], probe.pos[1], probe.pos[2], 25.f, duRGBA(255,0,0,255), 2, offset);
|
duDebugDrawCross(dd, probe.pos[0], probe.pos[1], probe.pos[2], 25.f, duRGBA(255,0,0,255), 2, offset);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
rdIgnoreUnused(dd);
|
||||||
|
rdIgnoreUnused(tile);
|
||||||
|
rdIgnoreUnused(offset);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
// NOTE: these are defines as we need to be able to switch between code that is
|
// NOTE: these are defines as we need to be able to switch between code that is
|
||||||
// dedicated for each version, during compile time.
|
// dedicated for each version, during compile time.
|
||||||
#define DT_NAVMESH_SET_VERSION 9 // Public versions: 5,7,8,9.
|
#define DT_NAVMESH_SET_VERSION 8 // Public versions: 5,7,8,9.
|
||||||
#define DT_NAVMESH_SET_MAGIC ('M'<<24 | 'S'<<16 | 'E'<<8 | 'T')
|
#define DT_NAVMESH_SET_MAGIC ('M'<<24 | 'S'<<16 | 'E'<<8 | 'T')
|
||||||
int dtGetNavMeshVersionForSet(const int setVersion);
|
int dtGetNavMeshVersionForSet(const int setVersion);
|
||||||
|
|
||||||
@ -395,7 +395,9 @@ struct dtMeshHeader
|
|||||||
int bvNodeCount; ///< The number of bounding volume nodes. (Zero if bounding volumes are disabled.)
|
int bvNodeCount; ///< The number of bounding volume nodes. (Zero if bounding volumes are disabled.)
|
||||||
int offMeshConCount; ///< The number of off-mesh connections.
|
int offMeshConCount; ///< The number of off-mesh connections.
|
||||||
int offMeshBase; ///< The index of the first polygon which is an off-mesh connection.
|
int offMeshBase; ///< The index of the first polygon which is an off-mesh connection.
|
||||||
|
#if DT_NAVMESH_SET_VERSION >= 8
|
||||||
int maxCellCount; ///< The number of allocated cells.
|
int maxCellCount; ///< The number of allocated cells.
|
||||||
|
#endif
|
||||||
|
|
||||||
float walkableHeight; ///< The height of the agents using the tile.
|
float walkableHeight; ///< The height of the agents using the tile.
|
||||||
float walkableRadius; ///< The radius of the agents using the tile.
|
float walkableRadius; ///< The radius of the agents using the tile.
|
||||||
|
@ -315,7 +315,9 @@ dtStatus dtNavMesh::init(unsigned char* data, const int dataSize, const int tabl
|
|||||||
params.polyGroupCount = 0;
|
params.polyGroupCount = 0;
|
||||||
params.traversalTableSize = 0;
|
params.traversalTableSize = 0;
|
||||||
params.traversalTableCount = tableCount;
|
params.traversalTableCount = tableCount;
|
||||||
|
#if DT_NAVMESH_SET_VERSION >= 7
|
||||||
params.magicDataCount = 0;
|
params.magicDataCount = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
dtStatus status = init(¶ms);
|
dtStatus status = init(¶ms);
|
||||||
if (dtStatusFailed(status))
|
if (dtStatusFailed(status))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user