mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-10 22:31:40 +02:00
Correctly initialize graph cost in turns instead of default 255 turns
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user