From f7e83342a013c541d8a48115e5987e4cfc3d5e3b Mon Sep 17 00:00:00 2001 From: Timothy Stiles Date: Wed, 14 Oct 2020 22:33:45 +1100 Subject: [PATCH] fix a turn based rewinding visual bug --- js/game.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/game.js b/js/game.js index c9dfd1b..1959541 100644 --- a/js/game.js +++ b/js/game.js @@ -979,7 +979,13 @@ export class Level { } undo() { + //reverse the pending_undo too + this.pending_undo.reverse(); + for (let undo of this.pending_undo) { + undo(); + } this.pending_undo = []; + this.aid = Math.max(1, this.aid); let entry = this.undo_stack.pop();