Browse Source

Fix simturns termination check

Ivan Savenko 1 year ago
parent
commit
45a3d04d25
1 changed files with 2 additions and 0 deletions
  1. 2 0
      server/processors/TurnOrderProcessor.cpp

+ 2 - 0
server/processors/TurnOrderProcessor.cpp

@@ -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();