@@ -703,8 +703,20 @@ class FreeplayState extends MusicBeatSubState
703703
704704 if (onlyIfChanged )
705705 {
706- // == performs equality by reference
707- if (tempSongs .isEqualUnordered (currentFilteredSongs )) return ;
706+ if (tempSongs .isEqualUnordered (currentFilteredSongs ))
707+ {
708+ // If the song list is the same, we don't need to generate a new list.
709+
710+ // Instead, we just apply the jump-in animation to the existing capsules.
711+ for (capsule in grpCapsules .members )
712+ {
713+ capsule .initPosition (FlxG .width , 0 );
714+ capsule .initJumpIn (0 , force );
715+ }
716+
717+ // Stop processing.
718+ return ;
719+ }
708720 }
709721
710722 // Only now do we know that the filter is actually changing.
@@ -721,7 +733,8 @@ class FreeplayState extends MusicBeatSubState
721733
722734 // Initialize the random capsule, with empty/blank info (which we display once bf/pico does his hand)
723735 var randomCapsule : SongMenuItem = grpCapsules .recycle (SongMenuItem );
724- randomCapsule .init (FlxG .width , 0 , null , styleData );
736+ randomCapsule .initPosition (FlxG .width , 0 );
737+ randomCapsule .initData (null , styleData );
725738 randomCapsule .y = randomCapsule .intendedY (0 ) + 10 ;
726739 randomCapsule .targetPos .x = randomCapsule .x ;
727740 randomCapsule .alpha = 0 ;
@@ -736,7 +749,8 @@ class FreeplayState extends MusicBeatSubState
736749 if (fromCharSelect ) randomCapsule .forcePosition ();
737750 else
738751 {
739- randomCapsule .initJumpIn (0 , force );
752+ // randomCapsule.initJumpIn(0, force);
753+ randomCapsule .forcePosition ();
740754 }
741755
742756 var hsvShader : HSVShader = new HSVShader ();
@@ -750,7 +764,8 @@ class FreeplayState extends MusicBeatSubState
750764
751765 var funnyMenu : SongMenuItem = grpCapsules .recycle (SongMenuItem );
752766
753- funnyMenu .init (FlxG .width , 0 , tempSong , styleData );
767+ funnyMenu .initPosition (FlxG .width , 0 );
768+ funnyMenu .initData (tempSong , styleData );
754769 funnyMenu .onConfirm = function () {
755770 capsuleOnOpenDefault (funnyMenu );
756771 };
@@ -760,8 +775,12 @@ class FreeplayState extends MusicBeatSubState
760775 funnyMenu .capsule .alpha = 0.5 ;
761776 funnyMenu .hsvShader = hsvShader ;
762777 funnyMenu .newText .animation .curAnim .curFrame = 45 - ((i * 4 ) % 45 );
778+
779+ // This stops the bounce-in animation.
763780 funnyMenu .forcePosition ();
764781
782+ // funnyMenu.initJumpIn(0, force);
783+
765784 grpCapsules .add (funnyMenu );
766785 }
767786
@@ -770,7 +789,6 @@ class FreeplayState extends MusicBeatSubState
770789 rememberSelection ();
771790 changeSelection ();
772791 refreshCapsuleDisplays ();
773-
774792 }
775793
776794 /**
@@ -1566,7 +1584,6 @@ class FreeplayState extends MusicBeatSubState
15661584 if (dj != null ) dj .resetAFKTimer ();
15671585 changeDiff (1 );
15681586 generateSongList (currentFilter , true , false );
1569-
15701587 }
15711588
15721589 if (controls. BACK && ! busy )
@@ -1795,7 +1812,7 @@ class FreeplayState extends MusicBeatSubState
17951812
17961813 if (songCapsule .freeplayData != null )
17971814 {
1798- songCapsule .init ( null , null , songCapsule .freeplayData );
1815+ songCapsule .initData ( songCapsule .freeplayData );
17991816 songCapsule .checkClip ();
18001817 }
18011818 }
0 commit comments