Skip to content

Commit

Permalink
cleanup deployment zone rendering code in minimap
Browse files Browse the repository at this point in the history
  • Loading branch information
NickAragua committed Sep 11, 2022
1 parent ce2a7cf commit a8227bd
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions megamek/src/megamek/client/ui/swing/minimap/Minimap.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a8227bd

Please sign in to comment.