fix a turn based rewinding visual bug

This commit is contained in:
Timothy Stiles 2020-10-14 22:33:45 +11:00
parent be5cc7f97f
commit f7e83342a0

View File

@ -979,7 +979,13 @@ export class Level {
} }
undo() { undo() {
//reverse the pending_undo too
this.pending_undo.reverse();
for (let undo of this.pending_undo) {
undo();
}
this.pending_undo = []; this.pending_undo = [];
this.aid = Math.max(1, this.aid); this.aid = Math.max(1, this.aid);
let entry = this.undo_stack.pop(); let entry = this.undo_stack.pop();