mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-15 20:03:15 +02:00
Do not consider corpses for movement range display (#1476)
This commit is contained in:
@@ -211,11 +211,11 @@ std::set<BattleHex> BattleFieldController::getHighlightedHexesStackRange()
|
|||||||
for(BattleHex hex : set)
|
for(BattleHex hex : set)
|
||||||
result.insert(hex);
|
result.insert(hex);
|
||||||
|
|
||||||
// display the movement shadow of the stack at b (i.e. stack under mouse)
|
// display the movement shadow of stack under mouse
|
||||||
const CStack * const shere = owner.curInt->cb->battleGetStackByPos(hoveredHex, false);
|
const CStack * const hoveredStack = owner.curInt->cb->battleGetStackByPos(hoveredHex, true);
|
||||||
if(shere && shere != owner.stacksController->getActiveStack() && shere->alive())
|
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)
|
for(BattleHex hex : v)
|
||||||
result.insert(hex);
|
result.insert(hex);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user