瀏覽代碼

Correctly initialize graph cost in turns instead of default 255 turns

Ivan Savenko 9 月之前
父節點
當前提交
f6f99d2384
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      AI/Nullkiller/Pathfinding/GraphPaths.cpp

+ 1 - 0
AI/Nullkiller/Pathfinding/GraphPaths.cpp

@@ -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);