From 866a0a1fc021f8131796dbaa9865b63bcd66d68f Mon Sep 17 00:00:00 2001
From: ArseniyShestakov <ArseniyShestakov@users.noreply.github.com>
Date: Sun, 8 Nov 2015 23:02:59 +0300
Subject: [PATCH] VCAI: little improvement for
 2a59cb619137cb443adce6aba009ecf37a6a57da

---
 AI/VCAI/VCAI.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/AI/VCAI/VCAI.cpp b/AI/VCAI/VCAI.cpp
index dfa906580..399d1a5ac 100644
--- a/AI/VCAI/VCAI.cpp
+++ b/AI/VCAI/VCAI.cpp
@@ -3372,7 +3372,8 @@ int3 SectorMap::findFirstVisitableTile (HeroPtr h, crint3 dst)
 	while(curtile != h->visitablePos())
 	{
 		auto topObj = cb->getTopObj(curtile);
-		if (topObj && topObj->ID == Obj::HERO && h->tempOwner == topObj->tempOwner && topObj != h.h)
+		if(topObj && topObj->ID == Obj::HERO && topObj != h.h &&
+			cb->getPlayerRelations(h->tempOwner, topObj->tempOwner) != PlayerRelations::ENEMIES)
 		{
 			logAi->warnStream() << ("Another allied hero stands in our way");
 			return ret;