mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-28 11:39:42 +00:00
Do not try to update tile to post
changedTiles contains unique set of positions and tilesToPost is empty initially therefore it's not possible to add the same position twice.
This commit is contained in:
parent
c4d357df0f
commit
d1a294664e
1 changed files with 1 additions and 9 deletions
|
@ -177,16 +177,8 @@ namespace DetourNavigator
|
|||
const auto locked = cached->lockConst();
|
||||
const auto& navMesh = locked->getImpl();
|
||||
for (const auto& [tilePosition, changeType] : changedTiles)
|
||||
{
|
||||
if (navMesh.getTileAt(tilePosition.x(), tilePosition.y(), 0))
|
||||
{
|
||||
auto tileToPost = tilesToPost.find(tilePosition);
|
||||
if (tileToPost == tilesToPost.end())
|
||||
tilesToPost.emplace(tilePosition, changeType);
|
||||
else
|
||||
tileToPost->second = addChangeType(tileToPost->second, changeType);
|
||||
}
|
||||
}
|
||||
tilesToPost.emplace(tilePosition, changeType);
|
||||
const auto maxTiles = std::min(mSettings.mMaxTilesNumber, navMesh.getParams()->maxTiles);
|
||||
mRecastMeshManager.forEachTile([&] (const TilePosition& tile, CachedRecastMeshManager& recastMeshManager)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue