1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Fixed #2308 - AI didn't attack enemy heroes at all.

This commit is contained in:
DjWarmonger 2015-10-25 11:55:50 +01:00
parent 768b1ca289
commit 2a59cb6191

View File

@ -3351,7 +3351,7 @@ int3 SectorMap::findFirstVisitableTile (HeroPtr h, crint3 dst)
while(curtile != h->visitablePos())
{
auto topObj = cb->getTopObj(curtile);
if (topObj && topObj->ID == Obj::HERO && topObj != h.h)
if (topObj && topObj->ID == Obj::HERO && h->tempOwner == topObj->tempOwner && topObj != h.h)
{
logAi->warnStream() << ("Another allied hero stands in our way");
return ret;