1
0
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:
elsid 2021-06-27 16:25:56 +02:00
parent 81e569c3d9
commit a8ba9a0e2a
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

View File

@ -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;