mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-15 20:03:15 +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)
|
for (CGObjectInstance* obj : posTile.visitableObjects)
|
||||||
{
|
{
|
||||||
if(obj->isBlockedVisitable())
|
if (obj->ID == Obj::MONSTER)
|
||||||
{
|
return pos;
|
||||||
if (obj->ID == Obj::MONSTER) // Monster
|
|
||||||
return pos;
|
|
||||||
else
|
|
||||||
return int3(-1, -1, -1); //blockvis objects are not guarded by neighbouring creatures
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user