mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2024-12-29 03:19:44 +00:00
Cleanup unused tile positions from OffMeshConnectionsManager
This commit is contained in:
parent
81e569c3d9
commit
a8ba9a0e2a
@ -50,6 +50,16 @@ namespace DetourNavigator
|
||||
removed.emplace(endTilePosition);
|
||||
});
|
||||
|
||||
for (const TilePosition& tilePosition : removed)
|
||||
{
|
||||
const auto it = values->mByTilePosition.find(tilePosition);
|
||||
if (it == values->mByTilePosition.end())
|
||||
continue;
|
||||
it->second.erase(id);
|
||||
if (it->second.empty())
|
||||
values->mByTilePosition.erase(it);
|
||||
}
|
||||
|
||||
values->mById.erase(byId.first, byId.second);
|
||||
|
||||
return removed;
|
||||
|
Loading…
Reference in New Issue
Block a user