1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-23 21:56:46 +00:00

Fix a crash when skipping in the song before it started.

This commit is contained in:
EliteMasterEric 2024-08-28 05:40:50 -04:00
parent 71ecc8f651
commit 469ff6690f

View file

@ -1979,7 +1979,7 @@ class PlayState extends MusicBeatSubState
if (vocals == null) return;
// 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;
FlxG.sound.music.pause();
vocals.pause();