1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Fix simturns termination check

This commit is contained in:
Ivan Savenko 2024-01-13 23:23:36 +02:00
parent fc163898d9
commit 45a3d04d25

View File

@ -107,6 +107,7 @@ bool TurnOrderProcessor::playersInContact(PlayerColor left, PlayerColor right) c
CPathsInfo out(mapSize, hero);
auto config = std::make_shared<SingleHeroPathfinderConfig>(out, gameHandler->gameState(), hero);
config->options.ignoreGuards = true;
config->options.turnLimit = 1;
CPathfinder pathfinder(gameHandler->gameState(), config);
pathfinder.calculatePaths();
@ -122,6 +123,7 @@ bool TurnOrderProcessor::playersInContact(PlayerColor left, PlayerColor right) c
CPathsInfo out(mapSize, hero);
auto config = std::make_shared<SingleHeroPathfinderConfig>(out, gameHandler->gameState(), hero);
config->options.ignoreGuards = true;
config->options.turnLimit = 1;
CPathfinder pathfinder(gameHandler->gameState(), config);
pathfinder.calculatePaths();