Fix demo playback (faucet was being created too early and immediately destroyed)

This commit is contained in:
Eevee (Evelyn Woods) 2020-09-23 21:42:05 -06:00
parent 8d0ea0c60e
commit a631b0f0e2

View File

@ -530,8 +530,8 @@ class Player extends PrimaryView {
} }
play_demo() { play_demo() {
this.demo_faucet = this.level.stored_level.demo[Symbol.iterator]();
this.restart_level(); this.restart_level();
this.demo_faucet = this.level.stored_level.demo[Symbol.iterator]();
this.level.force_floor_direction = this.level.stored_level.demo.initial_force_floor_direction; this.level.force_floor_direction = this.level.stored_level.demo.initial_force_floor_direction;
// FIXME should probably start playback on first real input // FIXME should probably start playback on first real input
this.set_state('playing'); this.set_state('playing');