Skip to content

Commit

Permalink
Main menu music doesn't cut out when switching states anymore.
Browse files Browse the repository at this point in the history
  • Loading branch information
EliteMasterEric authored and ninjamuffin99 committed Oct 4, 2024
1 parent 391c2bb commit fd17e27
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion source/funkin/ui/freeplay/FreeplayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1646,7 +1646,9 @@ class FreeplayState extends MusicBeatSubState
FunkinSound.playMusic('freakyMenu',
{
overrideExisting: true,
restartTrack: false
restartTrack: false,
// Continue playing this music between states, until a different music track gets played.
persist: true
});
FlxG.sound.music.fadeIn(4.0, 0.0, 1.0);
close();
Expand Down
4 changes: 3 additions & 1 deletion source/funkin/ui/mainmenu/MainMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ class MainMenuState extends MusicBeatState
FunkinSound.playMusic('freakyMenu',
{
overrideExisting: true,
restartTrack: false
restartTrack: false,
// Continue playing this music between states, until a different music track gets played.
persist: true
});
}

Expand Down
4 changes: 3 additions & 1 deletion source/funkin/ui/story/StoryMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ class StoryMenuState extends MusicBeatState
FunkinSound.playMusic('freakyMenu',
{
overrideExisting: true,
restartTrack: false
restartTrack: false,
// Continue playing this music between states, until a different music track gets played.
persist: true
});
}

Expand Down
1 change: 1 addition & 0 deletions source/funkin/ui/title/TitleState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ class TitleState extends MusicBeatState
startingVolume: 0.0,
overrideExisting: true,
restartTrack: false,
// Continue playing this music between states, until a different music track gets played.
persist: true
});
// Fade from 0.0 to 1 over 4 seconds
Expand Down

0 comments on commit fd17e27

Please sign in to comment.