fix a turn based rewinding visual bug
This commit is contained in:
parent
be5cc7f97f
commit
f7e83342a0
@ -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();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user