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

AI: pathfinder api supports configuration

This commit is contained in:
Andrii Danylchenko
2018-07-28 15:30:57 +03:00
parent 9ab44b950a
commit 7150fc9f71
8 changed files with 41 additions and 13 deletions

View File

@ -1979,6 +1979,12 @@ void CGameState::calculatePaths(const CGHeroInstance *hero, CPathsInfo &out)
pathfinder.calculatePaths();
}
void CGameState::calculatePaths(std::shared_ptr<CPathfinderConfig> config, const CGHeroInstance * hero)
{
CPathfinder pathfinder(this, hero, config);
pathfinder.calculatePaths();
}
/**
* Tells if the tile is guarded by a monster as well as the position
* of the monster that will attack on it.