diff --git a/client/battle/BattleFieldController.cpp b/client/battle/BattleFieldController.cpp index 675b39fb0..2f4d3bb12 100644 --- a/client/battle/BattleFieldController.cpp +++ b/client/battle/BattleFieldController.cpp @@ -211,11 +211,11 @@ std::set 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 v = owner.curInt->cb->battleGetAvailableHexes(shere, true, nullptr); + std::vector v = owner.curInt->cb->battleGetAvailableHexes(hoveredStack, true, nullptr); for(BattleHex hex : v) result.insert(hex); }