mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: initialize tile cell occupy state
Initialize it in the file.
This commit is contained in:
parent
8977b6ce04
commit
9c190cc7ca
@ -302,7 +302,7 @@ struct dtCell
|
||||
float pos[3]; ///< The position of the cell.
|
||||
unsigned int polyIndex; ///< The index of the poly this cell is on.
|
||||
unsigned char pad;
|
||||
unsigned char occupystate[4]; ///< The occupation state of this cell, -1 means not occupied. See [r5apex_ds + 0xEF86C9].
|
||||
unsigned char occupyState[4]; ///< The occupation state of this cell, -1 means not occupied. See [r5apex_ds + 0xEF86C9].
|
||||
|
||||
#if DT_NAVMESH_SET_VERSION >= 9
|
||||
unsigned char data[27]; // TODO: reverse this, always appears 0.
|
||||
|
@ -1166,6 +1166,9 @@ bool dtCreateNavMeshData(dtNavMeshCreateParams* params, unsigned char** outData,
|
||||
|
||||
rdVcopy(cell.pos, cellItem.pos);
|
||||
cell.polyIndex = cellItem.polyIndex;
|
||||
|
||||
int* state = (int*)((uintptr_t)&cell.occupyState & ~0x3);
|
||||
*state = -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user