Skip to content

Commit

Permalink
Unit: don't unselect unit if it still has movement left
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGrieb committed Jul 14, 2021
1 parent 1bf1f8f commit e3f7531
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/main/java/me/rhin/openciv/game/player/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ public void onRightClick(ClickType clickType, int x, int y) {
if (selectedUnit.getCurrentMovement() >= selectedUnit.getPathMovement()) {
selectedUnit.sendMovementPacket();
}
unselectUnit();

if (selectedUnit.getCurrentMovement() - selectedUnit.getPathMovement() <= 0)
unselectUnit();
rightMouseHeld = false;
}
}
Expand Down

0 comments on commit e3f7531

Please sign in to comment.