summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateSelect.java6
-rw-r--r--core/src/ch/asynk/tankontank/screens/GameScreen.java1
2 files changed, 5 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateSelect.java b/core/src/ch/asynk/tankontank/game/states/StateSelect.java
index 14d0d1b..ed64a0e 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateSelect.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateSelect.java
@@ -58,7 +58,6 @@ public class StateSelect extends StateCommon
@Override
public void touchUp()
{
-
if (!isEnemy) {
if (map.possibleMoves.contains(upHex)) {
// quick move
@@ -75,8 +74,10 @@ public class StateSelect extends StateCommon
}
hidePossibilities();
- if (upHex.isOffMap())
+ if (upHex.isOffMap()) {
+ selectedUnit = null;
return;
+ }
Unit unit = upHex.getUnit();
@@ -84,6 +85,7 @@ public class StateSelect extends StateCommon
isEnemy = false;
ctrl.hud.actionButtons.hide();
map.clearAll();
+ selectedUnit = null;
return;
}
diff --git a/core/src/ch/asynk/tankontank/screens/GameScreen.java b/core/src/ch/asynk/tankontank/screens/GameScreen.java
index 13bb805..497dc5b 100644
--- a/core/src/ch/asynk/tankontank/screens/GameScreen.java
+++ b/core/src/ch/asynk/tankontank/screens/GameScreen.java
@@ -231,6 +231,7 @@ public class GameScreen implements Screen
{
// TankOnTank.debug("GameScreen", "resize (" + width + "," + height + ")");
mapViewport.update(width, height);
+ // FIXME hudViewort must always match with map
// hudViewport.update(width, height);
maxZoomOut = Math.min((virtualWidth / cam.viewportWidth), (virtualHeight / cam.viewportHeight));