mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +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);
|
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);
|
values->mById.erase(byId.first, byId.second);
|
||||||
|
|
||||||
return removed;
|
return removed;
|
||||||
|
Loading…
Reference in New Issue
Block a user