1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

NKAI: replace hardcoded pandora with more flexible solution

This commit is contained in:
Andrii Danylchenko
2024-09-20 15:57:02 +03:00
parent ec6c84b0e0
commit ce0f51672a
8 changed files with 23 additions and 18 deletions

View File

@ -164,7 +164,7 @@ void ObjectGraphCalculator::calculateConnections(const int3 & pos, std::vector<A
auto from = path.targetHero->visitablePos();
auto fromObj = actorObjectMap[path.targetHero];
auto danger = ai->pathfinder->getStorage()->evaluateDanger(pos, path.targetHero, true);
auto danger = ai->dangerEvaluator->evaluateDanger(pos, path.targetHero, true);
auto updated = target->tryAddConnection(
from,
pos,
@ -220,7 +220,7 @@ void ObjectGraphCalculator::calculateConnections(const int3 & pos, std::vector<A
continue;
}
auto danger = ai->pathfinder->getStorage()->evaluateDanger(pos2, path1.targetHero, true);
auto danger = ai->dangerEvaluator->evaluateDanger(pos2, path1.targetHero, true);
auto updated = target->tryAddConnection(
pos1,