From d2e900dc3a55ae4569014a59137b45d2024dc3f4 Mon Sep 17 00:00:00 2001 From: Timothy Stiles Date: Sat, 26 Sep 2020 22:31:18 +1000 Subject: [PATCH] fix a rewind bug in non turn based mode Was caused by not making these setters undoable. --- js/game.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/js/game.js b/js/game.js index 45e7754..9f82422 100644 --- a/js/game.js +++ b/js/game.js @@ -832,10 +832,9 @@ export class Level { if (actor.cell === goal_cell) return; - // TODO undo this stuff? - actor.previous_cell = actor.cell; - actor.animation_speed = speed; - actor.animation_progress = 0; + this._set_prop(actor, 'previous_cell', actor.cell); + this._set_prop(actor, 'animation_speed', speed); + this._set_prop(actor, 'animation_progress', 0); let original_cell = actor.cell; this.remove_tile(actor);