mirror of
https://github.com/ENSL/NS.git
synced 2024-11-21 20:21:14 +00:00
Update DetourTileCache.cpp
This commit is contained in:
parent
733ad6eb04
commit
11512d9d28
1 changed files with 4 additions and 1 deletions
|
@ -842,6 +842,8 @@ dtStatus dtTileCache::update(const float /*dt*/, dtNavMesh* navmesh,
|
|||
|
||||
}
|
||||
|
||||
bool bOffMeshChanged = false;
|
||||
|
||||
if (m_nupdate == 0)
|
||||
{
|
||||
for (int i = 0; i < m_params.maxOffMeshConnections; ++i)
|
||||
|
@ -854,6 +856,7 @@ dtStatus dtTileCache::update(const float /*dt*/, dtNavMesh* navmesh,
|
|||
navmesh->baseOffMeshLinks(con);
|
||||
navmesh->GlobalOffMeshLinks(con);
|
||||
con->state = DT_OFFMESH_CLEAN;
|
||||
bOffMeshChanged = true;
|
||||
}
|
||||
|
||||
if (con->state == DT_OFFMESH_REMOVING)
|
||||
|
@ -869,7 +872,7 @@ dtStatus dtTileCache::update(const float /*dt*/, dtNavMesh* navmesh,
|
|||
}
|
||||
|
||||
if (upToDate)
|
||||
*upToDate = m_nupdate == 0 && m_nreqs == 0 && m_nOffMeshReqs == 0;
|
||||
*upToDate = m_nupdate == 0 && m_nreqs == 0 && m_nOffMeshReqs == 0 && !bOffMeshChanged;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue