From a8227bd2ea84383c98c713e12ece6716c494964c Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 10 Sep 2022 22:50:41 -0400 Subject: [PATCH] cleanup deployment zone rendering code in minimap --- .../megamek/client/ui/swing/minimap/Minimap.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/megamek/src/megamek/client/ui/swing/minimap/Minimap.java b/megamek/src/megamek/client/ui/swing/minimap/Minimap.java index 2c189a96e45..963cf161d57 100644 --- a/megamek/src/megamek/client/ui/swing/minimap/Minimap.java +++ b/megamek/src/megamek/client/ui/swing/minimap/Minimap.java @@ -571,20 +571,12 @@ private synchronized void drawMap(boolean forceDraw) { /** Indicates the deployment hexes. */ private void drawDeploymentZone(Graphics g) { if ((null != client) && (null != game) - && (GamePhase.DEPLOYMENT == game.getPhase()) && (dialog != null)) { + && (GamePhase.DEPLOYMENT == game.getPhase()) && (dialog != null) + && (bv.getDeployingEntity() != null)) { GameTurn turn = game.getTurn(); if ((turn != null) && (turn.getPlayerNum() == client.getLocalPlayer().getId())) { Entity deployingUnit = bv.getDeployingEntity(); - int dir; - // We need to draw the same deployment zone as boardview - if ((deployingUnit != null) && (deployingUnit.getOwnerId() == turn.getPlayerNum())) { - dir = deployingUnit.getStartingPos(); - } else { - // if we can't get the deploy zone from the - // board view, punt and use the players zone - dir = client.getLocalPlayer().getStartingPos(); - } - + for (int j = 0; j < board.getWidth(); j++) { for (int k = 0; k < board.getHeight(); k++) { Coords coords = new Coords(j, k);