Fix song restart bug

This commit is contained in:
VirtuGuy
2026-05-18 15:45:35 -06:00
committed by Hundrec
parent 6ab6bc62e7
commit c1be637101
+1 -1
View File
@@ -2724,7 +2724,7 @@ class PlayState extends MusicBeatSubState
// Skip this if the music is paused (GameOver, Pause menu, start-of-song offset, etc.)
if (!(FlxG.sound.music?.playing ?? false)) return;
var timeToPlayAt:Float = Math.min(FlxG.sound.music.length,
var timeToPlayAt:Float = Math.min(FlxG.sound.music.length - 1,
Math.max(Math.min(Conductor.instance.combinedOffset, 0), Conductor.instance.songPosition) - Conductor.instance.combinedOffset);
trace('Resyncing vocals to ${timeToPlayAt}');