1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +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

@@ -39,8 +39,9 @@ ColorRGBA CMinimapInstance::getTileColor(const int3 & pos) const
return Colors::BLACK;
// if object at tile is owned - it will be colored as its owner
for (const CGObjectInstance *obj : tile->blockingObjects)
for (const ObjectInstanceID objectID : tile->blockingObjects)
{
const auto * obj = GAME->interface()->cb->getObj(objectID);
PlayerColor player = obj->getOwner();
if(player == PlayerColor::NEUTRAL)
return graphics->neutralColor;