1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Do not ignore block-visit objects when computing guardian locations

This commit is contained in:
Ivan Savenko
2023-11-28 19:32:03 +02:00
parent 37d81e916e
commit a7d6068bf6

View File

@@ -348,13 +348,8 @@ int3 CMap::guardingCreaturePosition (int3 pos) const
{
for (CGObjectInstance* obj : posTile.visitableObjects)
{
if(obj->isBlockedVisitable())
{
if (obj->ID == Obj::MONSTER) // Monster
return pos;
else
return int3(-1, -1, -1); //blockvis objects are not guarded by neighbouring creatures
}
if (obj->ID == Obj::MONSTER)
return pos;
}
}