1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-08 00:39:47 +02:00

Fixed an issue that could cause the AI to skip almost their entire turn

If the best Task is to recruit a hero this now triggers pathfinding again as the newly bought hero may impair other heroe's paths.
This commit is contained in:
Xilmi 2024-12-10 19:21:23 +01:00
parent 71553783e6
commit eab6de4686

View File

@ -397,7 +397,12 @@ void Nullkiller::makeTurn()
if(!executeTask(bestTask))
return;
updateAiState(i, true);
bool fastUpdate = true;
if (bestTask->getHero() != nullptr)
fastUpdate = false;
updateAiState(i, fastUpdate);
}
else
{