mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-13 11:40:38 +02:00
VCAI: little improvement for 2a59cb619137cb443adce6aba009ecf37a6a57da
This commit is contained in:
parent
a49950e958
commit
866a0a1fc0
@ -3372,7 +3372,8 @@ int3 SectorMap::findFirstVisitableTile (HeroPtr h, crint3 dst)
|
|||||||
while(curtile != h->visitablePos())
|
while(curtile != h->visitablePos())
|
||||||
{
|
{
|
||||||
auto topObj = cb->getTopObj(curtile);
|
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");
|
logAi->warnStream() << ("Another allied hero stands in our way");
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user