diff options
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Ctrl.java | 8 | ||||
-rw-r--r-- | core/src/ch/asynk/rustanddust/util/DB.java | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index 01dc202..fab6f01 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -117,8 +117,12 @@ public abstract class Ctrl implements Disposable // TODO REPLAY_ALL break; case REPLAY_LAST: - map.prepareReplayLastTurn(); - setState(StateType.REPLAY); + if (synched) { + this.hud.notify(battle.toString(), 2, Position.MIDDLE_CENTER, false); + } else { + map.prepareReplayLastTurn(); + setState(StateType.REPLAY); + } break; case LOAD: if (synched) { diff --git a/core/src/ch/asynk/rustanddust/util/DB.java b/core/src/ch/asynk/rustanddust/util/DB.java index 7b5a661..994e5d3 100644 --- a/core/src/ch/asynk/rustanddust/util/DB.java +++ b/core/src/ch/asynk/rustanddust/util/DB.java @@ -347,7 +347,7 @@ public class DB return r; } - private static final String LOAD_LAST_TURN = "select g._id, g.mode, g.battle, g.opponent, t.turn, t.currentPlayer, g.ts, 0" + private static final String LOAD_LAST_TURN = "select g._id, g.mode, g.battle, g.opponent, t.turn, t.currentPlayer, g.ts, g.synched" + ", t.state, t.stateH, g.orders, g.ordersH, null, null from games g inner join turns t on (g._id = t.game) where g._id=%d order by t.turn desc limit 1;"; public GameRecord loadLastTurn(int game) |