summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-04 16:17:25 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-04 16:17:25 +0100
commitb149e757362d29c01563a914c4e43d62128a3684 (patch)
tree331c5c7c45eee5ed46b1b79796fa6d417908f7c1 /core/src/ch/asynk/tankontank
parent4703a17cac8f2f0f74542c4fc0b371d24d052b4d (diff)
downloadRustAndDust-b149e757362d29c01563a914c4e43d62128a3684.zip
RustAndDust-b149e757362d29c01563a914c4e43d62128a3684.tar.gz
UnitDock: do not hit when not visible
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/UnitDock.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/hud/UnitDock.java b/core/src/ch/asynk/tankontank/game/hud/UnitDock.java
index c90ae81..49189f2 100644
--- a/core/src/ch/asynk/tankontank/game/hud/UnitDock.java
+++ b/core/src/ch/asynk/tankontank/game/hud/UnitDock.java
@@ -73,7 +73,7 @@ public class UnitDock extends Bg
@Override
public boolean hit(float x, float y)
{
- if (scaledRect.contains(x, y)) {
+ if (visible && scaledRect.contains(x, y)) {
int i = (int) ((scaledRect.y + scaledRect.height - y) / (scaledRect.height / pawns.size()));
selectedPawn = pawns.get(i);
return true;