浏览代码

Fixes BattleAI not selecting best hex when approaching nearest enemy

Ivan Savenko 9 月之前
父节点
当前提交
2d6ae7859b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      AI/BattleAI/BattleEvaluator.cpp

+ 1 - 1
AI/BattleAI/BattleEvaluator.cpp

@@ -390,7 +390,7 @@ BattleAction BattleEvaluator::goTowardsNearest(const CStack * stack, const Battl
 			return reachability.distances[h1.toInt()] < reachability.distances[h2.toInt()];
 		});
 
-	BattleHex bestNeighbour = hexes.front();
+	BattleHex bestNeighbour = targetHexes.front();
 
 	if(reachability.distances[bestNeighbour.toInt()] > GameConstants::BFIELD_SIZE)
 	{