Skip to content

Commit

Permalink
use the new bool to tell if we should start the song
Browse files Browse the repository at this point in the history
  • Loading branch information
Kade-github committed Sep 19, 2024
1 parent 31024eb commit e5dbe38
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions source/funkin/play/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ class PlayState extends MusicBeatSubState
// Reset music properly.
if (FlxG.sound.music != null)
{
FlxG.sound.music.time = Math.min(FlxG.sound.music.length, Math.max(0, startTimestamp - Conductor.instance.instrumentalOffset));
FlxG.sound.music.time = startTimestamp - Conductor.instance.instrumentalOffset;
FlxG.sound.music.pitch = playbackRate;
FlxG.sound.music.pause();
}
Expand Down Expand Up @@ -915,7 +915,11 @@ class PlayState extends MusicBeatSubState
{
// Do NOT apply offsets at this point, because they already got applied the previous frame!
Conductor.instance.update(Conductor.instance.songPosition + elapsed * 1000, false);
if (Conductor.instance.songPosition - Conductor.instance.instrumentalOffset >= (startTimestamp)) startSong();
if (Conductor.instance.songPosition - Conductor.instance.instrumentalOffset >= (startTimestamp) && Countdown.finished)
{
trace("started song at " + Conductor.instance.songPosition);
startSong();
}
}
}
else
Expand Down

0 comments on commit e5dbe38

Please sign in to comment.