Pārlūkot izejas kodu

VCAI: little improvement for 2a59cb619137cb443adce6aba009ecf37a6a57da

ArseniyShestakov 10 gadi atpakaļ
vecāks
revīzija
866a0a1fc0
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      AI/VCAI/VCAI.cpp

+ 2 - 1
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;