From b997f8660183209b7e43d08662c00924cc82e392 Mon Sep 17 00:00:00 2001 From: KadeDeveloper Date: Wed, 21 Jul 2021 16:00:12 -0700 Subject: [PATCH] nuts --- source/ChartingState.hx | 9 +++++++++ source/GameOverSubstate.hx | 1 + source/PauseSubState.hx | 2 ++ 3 files changed, 12 insertions(+) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index e17e661..5237e1e 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -1162,6 +1162,14 @@ class ChartingState extends MusicBeatState }); var clearSectionButton:FlxButton = new FlxButton(10, 150, "Clear Section", clearSection); + var startSection:FlxButton = new FlxButton(10, 85, "Play Here", function() { + PlayState.SONG = _song; + FlxG.sound.music.stop(); + if (!PlayState.isSM) + vocals.stop(); + PlayState.startTime = lastUpdatedSection.startTime; + LoadingState.loadAndSwitchState(new PlayState()); + }); var swapSection:FlxButton = new FlxButton(10, 170, "Swap Section", function() { @@ -1234,6 +1242,7 @@ class ChartingState extends MusicBeatState tab_group_section.add(copyButton); tab_group_section.add(clearSectionButton); tab_group_section.add(swapSection); + tab_group_section.add(startSection); UI_box.addGroup(tab_group_section); } diff --git a/source/GameOverSubstate.hx b/source/GameOverSubstate.hx index 8a840b3..5cef652 100644 --- a/source/GameOverSubstate.hx +++ b/source/GameOverSubstate.hx @@ -104,6 +104,7 @@ class GameOverSubstate extends MusicBeatSubstate { if (!isEnding) { + PlayState.startTime = 0; isEnding = true; bf.playAnim('deathConfirm', true); FlxG.sound.music.stop(); diff --git a/source/PauseSubState.hx b/source/PauseSubState.hx index 8a371de..e6b68af 100644 --- a/source/PauseSubState.hx +++ b/source/PauseSubState.hx @@ -214,6 +214,7 @@ class PauseSubState extends MusicBeatSubstate case "Resume": close(); case "Restart Song": + PlayState.startTime = 0; if (PlayState.instance.useVideo) { GlobalVideo.get().stop(); @@ -222,6 +223,7 @@ class PauseSubState extends MusicBeatSubstate } FlxG.resetState(); case "Exit to menu": + PlayState.startTime = 0; if (PlayState.instance.useVideo) { GlobalVideo.get().stop();