diff options
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Ctrl.java | 10 | ||||
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/ctrl/Solo.java | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index 6b7b65d..e1f63b4 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -38,6 +38,7 @@ public abstract class Ctrl implements Disposable public boolean blockMap; public boolean blockHud; private Hex touchedHex; + protected boolean replayLastOrder; private final State selectState; private final State pathState; @@ -83,6 +84,7 @@ public abstract class Ctrl implements Disposable this.blockMap = false; this.blockHud = false; this.touchedHex = null; + this.replayLastOrder = false; this.selectState = new StateSelect(); this.pathState = new StateMove(); @@ -103,12 +105,18 @@ public abstract class Ctrl implements Disposable init(); StateCommon.set(game); hud.update(); - this.hud.notify(battle.toString(), 2, Position.MIDDLE_CENTER, false); this.state = selectState; this.stateType = StateType.DONE; setState(battle.getState()); + + if (replayLastOrder) { + map.prepareReplayLastAction(); + setState(StateType.REPLAY); + } else { + this.hud.notify(battle.toString(), 2, Position.MIDDLE_CENTER, false); + } } @Override diff --git a/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java b/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java index ec020a5..42d7008 100644 --- a/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java +++ b/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java @@ -31,6 +31,7 @@ public class Solo extends Ctrl load(Marshal.Mode.STATE, r.state); load(Marshal.Mode.ORDERS, r.orders); battle.getMap().clearMarshalUnits(); + replayLastOrder = !r.synched; r.dispose(); } else System.err.println("TODO : null GameRecord"); |