mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Pathfinder cache is now stored separately per playerBlocked
- human player will now use pathfinder settings from config (as before) - nullkiller AI will now use its own, modified settings - added option to configure NKAI usage of monolith to config - fixed pathfinder costs not updating on receiving levelup
This commit is contained in:
@@ -59,14 +59,17 @@ std::vector<std::shared_ptr<IPathfindingRule>> SingleHeroPathfinderConfig::build
|
||||
|
||||
SingleHeroPathfinderConfig::~SingleHeroPathfinderConfig() = default;
|
||||
|
||||
SingleHeroPathfinderConfig::SingleHeroPathfinderConfig(CPathsInfo & out, CGameState * gs, const CGHeroInstance * hero)
|
||||
SingleHeroPathfinderConfig::SingleHeroPathfinderConfig(CPathsInfo & out, const CGameInfoCallback * gs, const CGHeroInstance * hero)
|
||||
: PathfinderConfig(std::make_shared<NodeStorage>(out, hero), gs, buildRuleSet())
|
||||
, hero(hero)
|
||||
{
|
||||
pathfinderHelper = std::make_unique<CPathfinderHelper>(gs, hero, options);
|
||||
}
|
||||
|
||||
CPathfinderHelper * SingleHeroPathfinderConfig::getOrCreatePathfinderHelper(const PathNodeInfo & source, CGameState * gs)
|
||||
{
|
||||
if (!pathfinderHelper)
|
||||
pathfinderHelper = std::make_unique<CPathfinderHelper>(gs, hero, options);
|
||||
|
||||
return pathfinderHelper.get();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user