mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +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:
@@ -1140,15 +1140,9 @@ void CGameState::apply(CPackForClient & pack)
|
||||
pack.applyGs(this);
|
||||
}
|
||||
|
||||
void CGameState::calculatePaths(const CGHeroInstance *hero, CPathsInfo &out)
|
||||
void CGameState::calculatePaths(const std::shared_ptr<PathfinderConfig> & config) const
|
||||
{
|
||||
calculatePaths(std::make_shared<SingleHeroPathfinderConfig>(out, this, hero));
|
||||
}
|
||||
|
||||
void CGameState::calculatePaths(const std::shared_ptr<PathfinderConfig> & config)
|
||||
{
|
||||
//FIXME: creating pathfinder is costly, maybe reset / clear is enough?
|
||||
CPathfinder pathfinder(this, config);
|
||||
CPathfinder pathfinder(const_cast<CGameState*>(this), config);
|
||||
pathfinder.calculatePaths();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user