瀏覽代碼

Do not consider corpses for movement range display (#1476)

Ivan Savenko 2 年之前
父節點
當前提交
785a9aadcd
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      client/battle/BattleFieldController.cpp

+ 4 - 4
client/battle/BattleFieldController.cpp

@@ -211,11 +211,11 @@ std::set<BattleHex> BattleFieldController::getHighlightedHexesStackRange()
 	for(BattleHex hex : set)
 		result.insert(hex);
 
-	// display the movement shadow of the stack at b (i.e. stack under mouse)
-	const CStack * const shere = owner.curInt->cb->battleGetStackByPos(hoveredHex, false);
-	if(shere && shere != owner.stacksController->getActiveStack() && shere->alive())
+	// display the movement shadow of stack under mouse
+	const CStack * const hoveredStack = owner.curInt->cb->battleGetStackByPos(hoveredHex, true);
+	if(hoveredStack && hoveredStack != owner.stacksController->getActiveStack())
 	{
-		std::vector<BattleHex> v = owner.curInt->cb->battleGetAvailableHexes(shere, true, nullptr);
+		std::vector<BattleHex> v = owner.curInt->cb->battleGetAvailableHexes(hoveredStack, true, nullptr);
 		for(BattleHex hex : v)
 			result.insert(hex);
 	}