mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-24 22:26:50 +00:00
Fix a crash when skipping in the song before it started.
This commit is contained in:
parent
71ecc8f651
commit
469ff6690f
|
@ -1979,7 +1979,7 @@ class PlayState extends MusicBeatSubState
|
||||||
if (vocals == null) return;
|
if (vocals == null) return;
|
||||||
|
|
||||||
// Skip this if the music is paused (GameOver, Pause menu, start-of-song offset, etc.)
|
// Skip this if the music is paused (GameOver, Pause menu, start-of-song offset, etc.)
|
||||||
if (!FlxG.sound.music.playing) return;
|
if (!(FlxG.sound.music?.playing ?? false)) return;
|
||||||
var timeToPlayAt:Float = Conductor.instance.songPosition - Conductor.instance.instrumentalOffset;
|
var timeToPlayAt:Float = Conductor.instance.songPosition - Conductor.instance.instrumentalOffset;
|
||||||
FlxG.sound.music.pause();
|
FlxG.sound.music.pause();
|
||||||
vocals.pause();
|
vocals.pause();
|
||||||
|
|
Loading…
Reference in a new issue