Limit the undo stack to 200 tics

This commit is contained in:
Eevee (Evelyn Woods) 2020-09-03 13:54:14 -06:00
parent 8384b8d268
commit 25989fc75b

View File

@ -700,6 +700,11 @@ class Level {
commit() {
this.undo_stack.push(this.pending_undo);
this.pending_undo = [];
// Limit the stack to, idk, 200 tics (10 seconds)
if (this.undo_stack.length > 200) {
this.undo_stack.splice(0, this.undo_stack.length - 200);
}
}
undo() {