Skip to content

Commit

Permalink
Merge pull request #2539 from gamerbross/bugfix/titlestate-startintro…
Browse files Browse the repository at this point in the history
…-crash

[BUGFIX] Fix TitleState bugs + crash
  • Loading branch information
EliteMasterEric authored May 29, 2024
2 parents d02ecd1 + b10872e commit 934d6c2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions source/funkin/ui/title/TitleState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ class TitleState extends MusicBeatState
// DEBUG BULLSHIT

// netConnection.addEventListener(MouseEvent.MOUSE_DOWN, overlay_onMouseDown);
new FlxTimer().start(1, function(tmr:FlxTimer) {
if (!initialized) new FlxTimer().start(1, function(tmr:FlxTimer) {
startIntro();
});
else
startIntro();
}

function client_onMetaData(metaData:Dynamic)
Expand Down Expand Up @@ -118,7 +120,7 @@ class TitleState extends MusicBeatState

function startIntro():Void
{
playMenuMusic();
if (!initialized || FlxG.sound.music == null) playMenuMusic();

persistentUpdate = true;

Expand Down Expand Up @@ -231,7 +233,7 @@ class TitleState extends MusicBeatState
overrideExisting: 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);
}

Expand Down

0 comments on commit 934d6c2

Please sign in to comment.