From b9f31b417031f558c9cc2eea2ef9a24c9700892c Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Sun, 27 Dec 2020 08:51:12 -0700 Subject: [PATCH] Attempt to fix the swap button flickering like mad --- js/game.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/game.js b/js/game.js index 9319006..3c0e984 100644 --- a/js/game.js +++ b/js/game.js @@ -977,8 +977,10 @@ export class Level extends LevelInterface { // FIXME cc2 has very poor interactions between this feature and cloners; come up with some // better rules as a default if (this.swap_player1) { - // Reset the set of keys released since last tic - this.p1_released = 0xff; + // Reset the set of keys released since last tic (but not the swap key, or holding it + // will swap us endlessly) + // FIXME this doesn't even quite work, it just swaps less aggressively? wtf + this.p1_released = 0xff & ~INPUT_BITS.swap; // Iterate backwards over the actor list looking for a viable next player to control let i0 = this.actors.indexOf(this.player);