1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-23 21:29:13 +02:00

VCAI: little improvement for 2a59cb619137cb443adce6aba009ecf37a6a57da

This commit is contained in:
ArseniyShestakov 2015-11-08 23:02:59 +03:00
parent a49950e958
commit 866a0a1fc0

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