mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: allow setting table count in dtNavMesh::init
Needed for pre-allocation on solo mesh.
This commit is contained in:
parent
5d34723773
commit
59a8f12e0e
@ -431,10 +431,11 @@ public:
|
|||||||
/// Initializes the navigation mesh for single tile use.
|
/// Initializes the navigation mesh for single tile use.
|
||||||
/// @param[in] data Data of the new tile. (See: #dtCreateNavMeshData)
|
/// @param[in] data Data of the new tile. (See: #dtCreateNavMeshData)
|
||||||
/// @param[in] dataSize The data size of the new tile.
|
/// @param[in] dataSize The data size of the new tile.
|
||||||
|
/// @param[in] tableCount The number of traversal tables this navmesh will use.
|
||||||
/// @param[in] flags The tile flags. (See: #dtTileFlags)
|
/// @param[in] flags The tile flags. (See: #dtTileFlags)
|
||||||
/// @return The status flags for the operation.
|
/// @return The status flags for the operation.
|
||||||
/// @see dtCreateNavMeshData
|
/// @see dtCreateNavMeshData
|
||||||
dtStatus init(unsigned char* data, const int dataSize, const int flags);
|
dtStatus init(unsigned char* data, const int dataSize, const int tableCount, const int flags);
|
||||||
|
|
||||||
/// The navigation mesh initialization params.
|
/// The navigation mesh initialization params.
|
||||||
const dtNavMeshParams* getParams() const;
|
const dtNavMeshParams* getParams() const;
|
||||||
|
@ -301,7 +301,7 @@ dtStatus dtNavMesh::init(const dtNavMeshParams* params)
|
|||||||
return DT_SUCCESS;
|
return DT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
dtStatus dtNavMesh::init(unsigned char* data, const int dataSize, const int flags)
|
dtStatus dtNavMesh::init(unsigned char* data, const int dataSize, const int tableCount, const int flags)
|
||||||
{
|
{
|
||||||
// Make sure the data is in right format.
|
// Make sure the data is in right format.
|
||||||
dtMeshHeader* header = (dtMeshHeader*)data;
|
dtMeshHeader* header = (dtMeshHeader*)data;
|
||||||
@ -319,7 +319,7 @@ dtStatus dtNavMesh::init(unsigned char* data, const int dataSize, const int flag
|
|||||||
params.maxPolys = header->polyCount;
|
params.maxPolys = header->polyCount;
|
||||||
params.polyGroupCount = 0;
|
params.polyGroupCount = 0;
|
||||||
params.traversalTableSize = 0;
|
params.traversalTableSize = 0;
|
||||||
params.traversalTableCount = 0;
|
params.traversalTableCount = tableCount;
|
||||||
params.magicDataCount = 0;
|
params.magicDataCount = 0;
|
||||||
|
|
||||||
dtStatus status = init(¶ms);
|
dtStatus status = init(¶ms);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user