From f6f99d23840f2f73e13202b6f244745031d9bbe8 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Sun, 5 Jan 2025 18:05:28 +0000 Subject: [PATCH] Correctly initialize graph cost in turns instead of default 255 turns --- AI/Nullkiller/Pathfinding/GraphPaths.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/AI/Nullkiller/Pathfinding/GraphPaths.cpp b/AI/Nullkiller/Pathfinding/GraphPaths.cpp index 136e8491c..e8d68c79b 100644 --- a/AI/Nullkiller/Pathfinding/GraphPaths.cpp +++ b/AI/Nullkiller/Pathfinding/GraphPaths.cpp @@ -367,6 +367,7 @@ void GraphPaths::quickAddChainInfoWithBlocker(std::vector & paths, int3 // final node n.coord = tile; n.cost = targetNode.cost; + n.turns = static_cast(targetNode.cost); n.danger = danger; n.parentIndex = path.nodes.size(); path.nodes.push_back(n);