summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-12-09 14:00:37 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-12-09 14:00:37 +0100
commit639b08196704f1b73e1665d41db52ece172f85d6 (patch)
tree25125ca63c88e84c58ba735d6eeffa211b89932c /core/src/ch/asynk
parent437b538830028ee14ee5e957a01e77076d5fa96a (diff)
downloadRustAndDust-639b08196704f1b73e1665d41db52ece172f85d6.zip
RustAndDust-639b08196704f1b73e1665d41db52ece172f85d6.tar.gz
Revert "StateSelect: no need of HQ activation extra click"
this is needed if you want to move anther unit before the HQ This reverts commit 41aa097a355a37fe930d079ad21c11464222b855.
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/rustanddust/game/states/StateSelect.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/states/StateSelect.java b/core/src/ch/asynk/rustanddust/game/states/StateSelect.java
index 695fb41..1a7dce2 100644
--- a/core/src/ch/asynk/rustanddust/game/states/StateSelect.java
+++ b/core/src/ch/asynk/rustanddust/game/states/StateSelect.java
@@ -87,9 +87,15 @@ public class StateSelect extends StateCommon
isEnemy = ctrl.battle.getPlayer().isEnemy(unit);
if (!isEnemy && (unit == selectedUnit) && unit.canMove()) {
- // quick rotate
- to = upHex;
- ctrl.setState(StateType.ROTATE);
+ if (unit.isHq()) {
+ ctrl.hud.notify("HQ activation");
+ select(upHex, unit, isEnemy);
+ ctrl.setState(StateType.MOVE);
+ } else {
+ // quick rotate
+ to = upHex;
+ ctrl.setState(StateType.ROTATE);
+ }
} else {
select(upHex, unit, isEnemy);
ctrl.hud.notify(selectedUnit.toString());