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:
parent
768b1ca289
commit
2a59cb6191
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user