Fix old mesh tile not removed when new tile is empty
This commit is contained in:
parent
cadc3b0b14
commit
838fc67ab0
@ -631,7 +631,11 @@ dtStatus dtTileCache::buildNavMeshTile(const dtCompressedTileRef ref, dtNavMesh*
|
|||||||
|
|
||||||
// Early out if the mesh tile is empty.
|
// Early out if the mesh tile is empty.
|
||||||
if (!bc.lmesh->npolys)
|
if (!bc.lmesh->npolys)
|
||||||
|
{
|
||||||
|
// Remove existing tile.
|
||||||
|
navmesh->removeTile(navmesh->getTileRefAt(tile->header->tx,tile->header->ty,tile->header->tlayer),0,0);
|
||||||
return DT_SUCCESS;
|
return DT_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
dtNavMeshCreateParams params;
|
dtNavMeshCreateParams params;
|
||||||
memset(¶ms, 0, sizeof(params));
|
memset(¶ms, 0, sizeof(params));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user