mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-10 22:31:40 +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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user