mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-14 10:12:59 +02:00
TP onto friend attempt
Fixed an issue that caused the AI to think it can townportal onto heroes of other factions, for example their allies.
This commit is contained in:
parent
d59a1fe9e9
commit
74f3aedcc9
@ -1197,6 +1197,10 @@ void AINodeStorage::calculateTownPortal(
|
||||
continue;
|
||||
}
|
||||
|
||||
if (targetTown->visitingHero
|
||||
&& targetTown->visitingHero.get()->getFaction() != actor->hero->getFaction())
|
||||
continue;
|
||||
|
||||
auto nodeOptional = townPortalFinder.createTownPortalNode(targetTown);
|
||||
|
||||
if(nodeOptional)
|
||||
|
Loading…
Reference in New Issue
Block a user