mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: don't add tiles tagged as userId=1
Engine behavior.
This commit is contained in:
parent
0b688c6807
commit
3a17d60182
@ -1021,7 +1021,7 @@ dtStatus dtNavMesh::addTile(unsigned char* data, int dataSize, int flags,
|
||||
#endif
|
||||
|
||||
// Make sure the location is free.
|
||||
if (getTileAt(header->x, header->y, header->layer))
|
||||
if (!header->userId != 1 && getTileAt(header->x, header->y, header->layer))
|
||||
return DT_FAILURE | DT_ALREADY_OCCUPIED;
|
||||
|
||||
// Allocate a tile.
|
||||
@ -1070,9 +1070,12 @@ dtStatus dtNavMesh::addTile(unsigned char* data, int dataSize, int flags,
|
||||
tile->deleteCallback = nullptr;
|
||||
|
||||
// Insert tile into the position lut.
|
||||
int h = computeTileHash(header->x, header->y, m_tileLutMask);
|
||||
tile->next = m_posLookup[h];
|
||||
m_posLookup[h] = tile;
|
||||
if (header->userId != 1)
|
||||
{
|
||||
int h = computeTileHash(header->x, header->y, m_tileLutMask);
|
||||
tile->next = m_posLookup[h];
|
||||
m_posLookup[h] = tile;
|
||||
}
|
||||
|
||||
// Patch header pointers.
|
||||
const int headerSize = rdAlign4(sizeof(dtMeshHeader));
|
||||
|
Loading…
x
Reference in New Issue
Block a user