Skip to content

Commit

Permalink
Merge pull request #1417 from Kurtsley/fix-outofrange
Browse files Browse the repository at this point in the history
Fix out of range message when out of ammo.
  • Loading branch information
FilmBoy84 committed Apr 18, 2024
2 parents 6bb0528 + 80ed813 commit 978e0c5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions game/ui/tileview/battleview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2450,9 +2450,12 @@ void BattleView::updateAttackCost()
}
else if (!weapon->canFire(*state, target))
{
calculatedAttackCost =
static_cast<int>(weapon->type->launcher ? CalculatedAttackCostSpecial::NO_ARC
: CalculatedAttackCostSpecial::OUT_OF_RANGE);
if (!weapon->needsReload())
{
calculatedAttackCost = static_cast<int>(
weapon->type->launcher ? CalculatedAttackCostSpecial::NO_ARC
: CalculatedAttackCostSpecial::OUT_OF_RANGE);
}
}
else
{
Expand Down

0 comments on commit 978e0c5

Please sign in to comment.