1
0
mirror of https://github.com/vcmi/vcmi.git synced 2026-05-22 09:55:17 +02:00

Merge remote-tracking branch 'upstream/develop' into develop

This commit is contained in:
Xilmi
2024-09-22 23:43:29 +02:00
9 changed files with 24 additions and 18 deletions
+1 -3
View File
@@ -97,8 +97,6 @@ AINodeStorage::AINodeStorage(const Nullkiller * ai, const int3 & Sizes)
{
accessibility = std::make_unique<boost::multi_array<EPathAccessibility, 4>>(
boost::extents[sizes.z][sizes.x][sizes.y][EPathfindingLayer::NUM_LAYERS]);
dangerEvaluator.reset(new FuzzyHelper(ai));
}
AINodeStorage::~AINodeStorage() = default;
@@ -1420,7 +1418,7 @@ void AINodeStorage::calculateChainInfo(std::vector<AIPath> & paths, const int3 &
path.targetHero = node.actor->hero;
path.heroArmy = node.actor->creatureSet;
path.armyLoss = node.armyLoss;
path.targetObjectDanger = evaluateDanger(pos, path.targetHero, !node.actor->allowBattle);
path.targetObjectDanger = ai->dangerEvaluator->evaluateDanger(pos, path.targetHero, !node.actor->allowBattle);
if(path.targetObjectDanger > 0)
{