Go back to toggling green objects instantly

This commit is contained in:
Eevee (Evelyn Woods) 2020-12-12 19:22:04 -07:00
parent 4d23acb27e
commit 3a04b6276c
2 changed files with 1 additions and 7 deletions

View File

@ -502,7 +502,6 @@ export class Level {
// Used for various tic-local effects; don't need to be undoable // Used for various tic-local effects; don't need to be undoable
// Used to check for a monster chomping the player's tail // Used to check for a monster chomping the player's tail
this.player_leaving_cell = this.player.cell; this.player_leaving_cell = this.player.cell;
this.toggle_green_objects = false;
// TODO maybe this should be undone anyway so rewind looks better? // TODO maybe this should be undone anyway so rewind looks better?
this.player.is_blocked = false; 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 // In the event that the player is sliding (and thus not deliberately moving) or has
// stopped, remember their current movement direction here, too. // 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. // This is hokey, and doing it here is even hokier, but it seems to match CC2 behavior.

View File

@ -1371,7 +1371,7 @@ const TILE_TYPES = {
}, },
on_arrive(me, level, other) { on_arrive(me, level, other) {
level.sfx.play_once('button-press', me.cell); 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) { on_depart(me, level, other) {
level.sfx.play_once('button-release', me.cell); level.sfx.play_once('button-release', me.cell);