1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Removed Max Movement Highlight stubs

This commit is contained in:
krs 2023-04-06 00:12:42 +03:00
parent 1644cab938
commit aba5840a6f
2 changed files with 0 additions and 30 deletions

View File

@ -259,31 +259,6 @@ std::set<BattleHex> BattleFieldController::getMovementRangeForHoveredStack()
return result;
}
std::set<BattleHex> BattleFieldController::STUB_getMaxMovementRangeForHoveredStack()
{
std::set<BattleHex> result;
if (!owner.stacksController->getActiveStack())
return result;
if (!settings["battle"]["movementHighlightOnHover"].Bool())
return result;
auto hoveredHex = getHoveredHex();
// add max movement hexes for stack under mouse
const CStack * const hoveredStack = owner.curInt->cb->battleGetStackByPos(hoveredHex, true);
if(hoveredStack)
{
auto hex = BattleHex(10, 5);
result.insert(hex);
}
return result;
}
std::set<BattleHex> BattleFieldController::getHighlightedHexesForSpellRange()
{
std::set<BattleHex> result;
@ -361,7 +336,6 @@ std::set<BattleHex> BattleFieldController::getHighlightedHexesMovementTarget()
void BattleFieldController::showHighlightedHexes(Canvas & canvas)
{
std::set<BattleHex> hoveredStackMovementRangeHexes = getMovementRangeForHoveredStack();
std::set<BattleHex> hoveredStackMaxMovementHexes = STUB_getMaxMovementRangeForHoveredStack();
std::set<BattleHex> hoveredSpellHexes = getHighlightedHexesForSpellRange();
std::set<BattleHex> hoveredMoveHexes = getHighlightedHexesMovementTarget();
@ -373,7 +347,6 @@ void BattleFieldController::showHighlightedHexes(Canvas & canvas)
for(int hex = 0; hex < GameConstants::BFIELD_SIZE; ++hex)
{
bool stackMovement = hoveredStackMovementRangeHexes.count(hex);
bool stackMaxMovement = hoveredStackMaxMovementHexes.count(hex);
bool mouse = hoveredMouseHexes.count(hex);
if(stackMovement && mouse) // area where hovered stackMovement can move shown with highlight. Because also affected by mouse cursor, shade as well
@ -389,8 +362,6 @@ void BattleFieldController::showHighlightedHexes(Canvas & canvas)
{
showHighlightedHex(canvas, cellUnitMovementHighlight, hex, false);
}
if(stackMaxMovement)
showHighlightedHex(canvas, cellUnitMaxMovementHighlight, hex, false);
}
}

View File

@ -52,7 +52,6 @@ class BattleFieldController : public CIntObject
std::set<BattleHex> getHighlightedHexesForActiveStack();
std::set<BattleHex> getMovementRangeForHoveredStack();
std::set<BattleHex> STUB_getMaxMovementRangeForHoveredStack();
std::set<BattleHex> getHighlightedHexesForSpellRange();
std::set<BattleHex> getHighlightedHexesMovementTarget();