1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-06-20 09:21:27 +00:00

Merge pull request #2539 from gamerbross/bugfix/titlestate-startintro-crash

[BUGFIX] Fix TitleState bugs + crash
This commit is contained in:
Eric 2024-05-29 01:50:46 -04:00 committed by GitHub
commit 934d6c2518
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -67,9 +67,11 @@ class TitleState extends MusicBeatState
// DEBUG BULLSHIT // DEBUG BULLSHIT
// netConnection.addEventListener(MouseEvent.MOUSE_DOWN, overlay_onMouseDown); // netConnection.addEventListener(MouseEvent.MOUSE_DOWN, overlay_onMouseDown);
new FlxTimer().start(1, function(tmr:FlxTimer) { if (!initialized) new FlxTimer().start(1, function(tmr:FlxTimer) {
startIntro(); startIntro();
}); });
else
startIntro();
} }
function client_onMetaData(metaData:Dynamic) function client_onMetaData(metaData:Dynamic)
@ -118,7 +120,7 @@ class TitleState extends MusicBeatState
function startIntro():Void function startIntro():Void
{ {
playMenuMusic(); if (!initialized || FlxG.sound.music == null) playMenuMusic();
persistentUpdate = true; persistentUpdate = true;
@ -231,7 +233,7 @@ class TitleState extends MusicBeatState
overrideExisting: true, overrideExisting: true,
restartTrack: true restartTrack: true
}); });
// Fade from 0.0 to 0.7 over 4 seconds // Fade from 0.0 to 1 over 4 seconds
if (shouldFadeIn) FlxG.sound.music.fadeIn(4.0, 0.0, 1.0); if (shouldFadeIn) FlxG.sound.music.fadeIn(4.0, 0.0, 1.0);
} }