diff --git a/megamek/src/megamek/client/ui/swing/Ruler.java b/megamek/src/megamek/client/ui/swing/Ruler.java index 39b1eeb5ab0..2fa7d3983ff 100644 --- a/megamek/src/megamek/client/ui/swing/Ruler.java +++ b/megamek/src/megamek/client/ui/swing/Ruler.java @@ -379,7 +379,7 @@ private LosEffects.AttackInfo buildAttackInfo(Coords c1, Coords c2, int h1, ai.targetHeight = h2; ai.attackerIsMech = attackerIsMech; ai.targetIsMech = targetIsMech; - ai.attackAbsHeight =game.getBoard().getHex(c1).floor() + h1; + ai.attackAbsHeight = game.getBoard().getHex(c1).floor() + h1; ai.targetAbsHeight = game.getBoard().getHex(c2).floor() + h2; return ai; } diff --git a/megamek/src/megamek/client/ui/swing/lobby/PlayerSettingsDialog.java b/megamek/src/megamek/client/ui/swing/lobby/PlayerSettingsDialog.java index e319ed62c03..cf13f5ba4f8 100644 --- a/megamek/src/megamek/client/ui/swing/lobby/PlayerSettingsDialog.java +++ b/megamek/src/megamek/client/ui/swing/lobby/PlayerSettingsDialog.java @@ -84,6 +84,7 @@ protected void finalizeInitialization() throws Exception { adaptToGUIScale(); super.finalizeInitialization(); } + @Override protected void okAction() { apply(); diff --git a/megamek/src/megamek/common/Entity.java b/megamek/src/megamek/common/Entity.java index 480af760fb6..a3d5a2334d7 100644 --- a/megamek/src/megamek/common/Entity.java +++ b/megamek/src/megamek/common/Entity.java @@ -12899,8 +12899,7 @@ public int getStartingPos(boolean inheritFromOwner) { final GameOptions gOpts = getGame().getOptions(); if (!getOwner().isBot() && gOpts.booleanOption(OptionsConstants.BASE_SET_PLAYER_DEPLOYMENT_TO_PLAYER0)) { return game.getPlayer(0).getStartingPos(); - } - else { + } else { return getOwner().getStartingPos(); } } @@ -15303,8 +15302,7 @@ public int getStartingOffset(boolean inheritFromOwner) { final GameOptions gOpts = getGame().getOptions(); if (!getOwner().isBot() && gOpts.booleanOption(OptionsConstants.BASE_SET_PLAYER_DEPLOYMENT_TO_PLAYER0)) { return game.getPlayer(0).getStartOffset(); - } - else { + } else { return getOwner().getStartOffset(); } } @@ -15327,8 +15325,7 @@ public int getStartingWidth(boolean inheritFromOwner) { final GameOptions gOpts = getGame().getOptions(); if (!getOwner().isBot() && gOpts.booleanOption(OptionsConstants.BASE_SET_PLAYER_DEPLOYMENT_TO_PLAYER0)) { return game.getPlayer(0).getStartWidth(); - } - else { + } else { return getOwner().getStartWidth(); } } @@ -15351,8 +15348,7 @@ public int getStartingAnyNWx(boolean inheritFromOwner) { final GameOptions gOpts = getGame().getOptions(); if (!getOwner().isBot() && gOpts.booleanOption(OptionsConstants.BASE_SET_PLAYER_DEPLOYMENT_TO_PLAYER0)) { return game.getPlayer(0).getStartingAnyNWx(); - } - else { + } else { return getOwner().getStartingAnyNWx(); } } @@ -15375,8 +15371,7 @@ public int getStartingAnyNWy(boolean inheritFromOwner) { final GameOptions gOpts = getGame().getOptions(); if (!getOwner().isBot() && gOpts.booleanOption(OptionsConstants.BASE_SET_PLAYER_DEPLOYMENT_TO_PLAYER0)) { return game.getPlayer(0).getStartingAnyNWy(); - } - else { + } else { return getOwner().getStartingAnyNWy(); } } @@ -15399,8 +15394,7 @@ public int getStartingAnySEx(boolean inheritFromOwner) { final GameOptions gOpts = getGame().getOptions(); if (!getOwner().isBot() && gOpts.booleanOption(OptionsConstants.BASE_SET_PLAYER_DEPLOYMENT_TO_PLAYER0)) { return game.getPlayer(0).getStartingAnySEx(); - } - else { + } else { return getOwner().getStartingAnySEx(); } } @@ -15423,8 +15417,7 @@ public int getStartingAnySEy(boolean inheritFromOwner) { final GameOptions gOpts = getGame().getOptions(); if (!getOwner().isBot() && gOpts.booleanOption(OptionsConstants.BASE_SET_PLAYER_DEPLOYMENT_TO_PLAYER0)) { return game.getPlayer(0).getStartingAnySEy(); - } - else { + } else { return getOwner().getStartingAnySEy(); } }