From 3a04b6276c1ef2202f3415e02960b94efb3c3d01 Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Sat, 12 Dec 2020 19:22:04 -0700 Subject: [PATCH] Go back to toggling green objects instantly --- js/game.js | 6 ------ js/tiletypes.js | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/js/game.js b/js/game.js index f14d35d..4c797ee 100644 --- a/js/game.js +++ b/js/game.js @@ -502,7 +502,6 @@ export class Level { // Used for various tic-local effects; don't need to be undoable // Used to check for a monster chomping the player's tail this.player_leaving_cell = this.player.cell; - this.toggle_green_objects = false; // TODO maybe this should be undone anyway so rewind looks better? this.player.is_blocked = false; @@ -748,11 +747,6 @@ export class Level { } } - if (this.toggle_green_objects) { - TILE_TYPES['button_green'].do_button(this); - this.toggle_green_objects = false; - } - // In the event that the player is sliding (and thus not deliberately moving) or has // stopped, remember their current movement direction here, too. // This is hokey, and doing it here is even hokier, but it seems to match CC2 behavior. diff --git a/js/tiletypes.js b/js/tiletypes.js index 8ca84e8..69767d4 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -1371,7 +1371,7 @@ const TILE_TYPES = { }, on_arrive(me, level, other) { level.sfx.play_once('button-press', me.cell); - level.toggle_green_objects = ! level.toggle_green_objects; + this.do_button(level); }, on_depart(me, level, other) { level.sfx.play_once('button-release', me.cell);