1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-10 22:31:40 +02:00

Merge pull request #5209 from IvanSavenko/ai_graph_fix

Correctly initialize graph cost in turns instead of default 255 turns
This commit is contained in:
Ivan Savenko
2025-01-06 14:34:37 +02:00
committed by GitHub

View File

@@ -367,6 +367,7 @@ void GraphPaths::quickAddChainInfoWithBlocker(std::vector<AIPath> & paths, int3
// final node
n.coord = tile;
n.cost = targetNode.cost;
n.turns = static_cast<ui8>(targetNode.cost);
n.danger = danger;
n.parentIndex = path.nodes.size();
path.nodes.push_back(n);