File tree Expand file tree Collapse file tree
source/funkin/ui/freeplay Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3257,11 +3257,16 @@ class FreeplayState extends MusicBeatSubState
32573257
32583258 if (grpCapsules .countLiving () > 0 && ! prepForNewRank && uiStateMachine .canInteract ())
32593259 {
3260- FlxG .sound .music ?. pause ();
3261- FlxTimer .wait (FADE_IN_DELAY , playCurSongPreview .bind (currentCapsule ));
3262- currentCapsule .selected = true ;
3260+ clearPreviews ();
32633261
3264- // switchBackingImage(currentCapsule.freeplayData);
3262+ // Create a timer to delay the song preview to prevent overlapping or cutting out.
3263+ var previewTransition = new FlxTimer ().start (FADE_IN_DELAY , function (_ )
3264+ {
3265+ if (FlxG .sound .music != null ) FlxG .sound .music .stop ();
3266+ playCurSongPreview (currentCapsule );
3267+ });
3268+
3269+ previewTimers .push (previewTransition );
32653270 }
32663271
32673272 // Small vibrations every selection change.
You can’t perform that action at this time.
0 commit comments