Merge pull request #95 from Sandern/fix-oldtile-not-removed
Make sure to remove the old tile if the new tile is empty (due to temp obstacles)
This commit is contained in:
commit
d742e04cc4
@ -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