1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

Remove pointer to objects from TerrainTile

This commit is contained in:
Ivan Savenko
2025-03-19 14:40:45 +00:00
parent 63d00b080e
commit cd7732456a
26 changed files with 164 additions and 113 deletions

View File

@ -251,7 +251,8 @@ TeleporterTilesVector CPathfinderHelper::getAllowedTeleportChannelExits(const Te
auto pos = obj->getBlockedPos();
for(const auto & p : pos)
{
if(gs->getMap().getTile(p).topVisitableId() == obj->ID)
ObjectInstanceID topObject = gs->getMap().getTile(p).topVisitableObj();
if(topObject.hasValue() && getObj(topObject)->ID == obj->ID)
allowedExits.push_back(p);
}
}