diff --git a/source/funkin/play/PauseSubState.hx b/source/funkin/play/PauseSubState.hx index 2ebcf63a0..01b73e294 100644 --- a/source/funkin/play/PauseSubState.hx +++ b/source/funkin/play/PauseSubState.hx @@ -1041,14 +1041,18 @@ class PauseSubState extends MusicBeatSubState * Quit the game and return to the chart editor. * @param state The current PauseSubState. */ + @:access(funkin.play.PlayState) static function quitToChartEditor(state:PauseSubState):Void { #if FEATURE_MOBILE_ADVERTISEMENTS AdMobUtil.removeBanner(); #end - if (FlxG.sound.music != null) FlxG.sound.music.pause(); // Don't reset song position! + // This should come first because the sounds list gets cleared! + PlayState.instance?.forEachPausedSound(s -> s.destroy()); state.close(); - PlayState.instance.close(); // This only works because PlayState is a substate! + FlxG.sound.music?.pause(); // Don't reset song position! + PlayState.instance?.vocals?.pause(); + PlayState.instance?.close(); // This only works because PlayState is a substate! } }