Browse Source

Do not ignore block-visit objects when computing guardian locations

Ivan Savenko 2 years ago
parent
commit
a7d6068bf6
1 changed files with 2 additions and 7 deletions
  1. 2 7
      lib/mapping/CMap.cpp

+ 2 - 7
lib/mapping/CMap.cpp

@@ -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;
 		}
 	}