Compare revisions by equality to support overflow

pull/578/head
elsid 5 years ago
parent 7ae7cb181d
commit 5168f2059f
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

@ -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…
Cancel
Save