mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-31 01:20:23 +00:00
Compare revisions by equality to support overflow
This commit is contained in:
parent
7ae7cb181d
commit
5168f2059f
@ -34,7 +34,7 @@ namespace MWRender
|
||||
void NavMesh::update(const dtNavMesh& navMesh, const std::size_t id,
|
||||
const std::size_t generation, const std::size_t revision, const DetourNavigator::Settings& settings)
|
||||
{
|
||||
if (!mEnabled || (mGroup && mId == id && mGeneration >= generation && mRevision >= revision))
|
||||
if (!mEnabled || (mGroup && mId == id && mGeneration == generation && mRevision == revision))
|
||||
return;
|
||||
|
||||
mId = id;
|
||||
|
@ -147,7 +147,7 @@ namespace DetourNavigator
|
||||
const auto playerTile = getTilePosition(mSettings, toNavMeshCoordinates(mSettings, playerPosition));
|
||||
auto& lastRevision = mLastRecastMeshManagerRevision[agentHalfExtents];
|
||||
auto lastPlayerTile = mPlayerTile.find(agentHalfExtents);
|
||||
if (lastRevision >= mRecastMeshManager.getRevision() && lastPlayerTile != mPlayerTile.end()
|
||||
if (lastRevision == mRecastMeshManager.getRevision() && lastPlayerTile != mPlayerTile.end()
|
||||
&& lastPlayerTile->second == playerTile)
|
||||
return;
|
||||
lastRevision = mRecastMeshManager.getRevision();
|
||||
|
Loading…
x
Reference in New Issue
Block a user