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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user