Fix keys accumulating while paused

This commit is contained in:
Eevee (Evelyn Woods) 2020-12-06 16:23:43 -07:00
parent 54381370c0
commit 4838bb189b

View File

@ -1060,6 +1060,12 @@ class Player extends PrimaryView {
this.state = new_state;
// Drop any "new" keys when switching into playing, since they accumulate freely as long as
// the game isn't actually running
if (new_state === 'playing') {
this.current_keys_new.clear();
}
// Populate the overlay
let overlay_reason = '';
let overlay_top = '';