Skip to content

Commit

Permalink
fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kuronekochomusuke committed Nov 28, 2024
1 parent bf1f466 commit ab76ef2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions megamek/src/megamek/client/ui/swing/MovementDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ private void updateButtons() {
(ce instanceof Tank)
&& (ce.getSwarmAttackerId() != Entity.NONE));

boolean fleeStart = ce().canFlee(ce().getPosition());
boolean fleeStart = (ce().canFlee(ce().getPosition()) && (cmd.getLastStep() == null));
boolean fleeEnd = (cmd.getLastStep() != null) && (ce().canFlee(cmd.getLastStep().getPosition()));
setFleeEnabled(fleeStart || fleeEnd);
if (gOpts.booleanOption(OptionsConstants.ADVGRNDMOV_VEHICLES_CAN_EJECT) && (ce instanceof Tank)) {
Expand Down Expand Up @@ -971,7 +971,7 @@ private void updateMove(boolean redrawMovement) {
clientgui.getBoardView().drawMovementData(ce(), cmd);
}

boolean fleeStart = ce().canFlee(ce().getPosition());
boolean fleeStart = (ce().canFlee(ce().getPosition()) && (cmd.getLastStep() == null));
boolean fleeEnd = (cmd.getLastStep() != null) && (ce().canFlee(cmd.getLastStep().getPosition()));
setFleeEnabled(fleeStart || fleeEnd);
updateDonePanel();
Expand Down

0 comments on commit ab76ef2

Please sign in to comment.