mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Added option to ignore guards in pathfinder
Used for simturns contact detection, by default disabled for player pathfinding
This commit is contained in:
@@ -106,6 +106,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;
|
||||
CPathfinder pathfinder(gameHandler->gameState(), config);
|
||||
pathfinder.calculatePaths();
|
||||
|
||||
@@ -120,6 +121,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;
|
||||
CPathfinder pathfinder(gameHandler->gameState(), config);
|
||||
pathfinder.calculatePaths();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user