@@ -256,7 +256,7 @@ class FreeplayState extends MusicBeatState
256256 #if PRELOAD_ALL
257257 var dontPlaySongThisFrame = false ;
258258 autoplayElapsed + = elapsed ;
259- if (! disableAutoPlay && ! songInstPlaying && (autoplayElapsed > timeUntilAutoplay || FlxG . keys . justPressed . SPACE )) {
259+ if (! disableAutoPlay && ! songInstPlaying && (autoplayElapsed > timeUntilAutoplay )) {
260260 if (curPlayingInst != (curPlayingInst = Paths .inst (curSong .name , curSongDifficulty , curSong .instSuffix ))) {
261261 var streamed = false ;
262262 if (Options .streamedMusic ) {
@@ -362,30 +362,31 @@ class FreeplayState extends MusicBeatState
362362 {
363363 if (change == 0 && ! force ) return ;
364364
365- var curSong = songs [curSelected ];
366- var validDifficulties = curSong .difficulties .length > 0 ;
367- var event = event (" onChangeDiff" , EventManager .get (MenuChangeEvent ).recycle (curDifficulty , validDifficulties ? FlxMath .wrap (curDifficulty + change , 0 , curSong .difficulties .length - 1 ) : 0 , change ));
365+ var song = songs [curSelected ];
366+ var validDifficulties = song .difficulties .length > 0 ;
367+ var event = event (" onChangeDiff" , EventManager .get (MenuChangeEvent ).recycle (curDifficulty , validDifficulties ? FlxMath .wrap (curDifficulty + change , 0 , song .difficulties .length - 1 ) : 0 , change ));
368368
369369 if (event .cancelled ) {
370- updateCurSongMeta ();
370+ if ( force ) updateCurSongMeta ();
371371 return ;
372372 }
373373
374+ var prevInstSuffix = curSong .instSuffix ;
374375 curDifficulty = event .value ;
375376 updateCurSongMeta ();
376377 updateScore ();
377378
378379 #if PRELOAD_ALL
379- if (songs [ curSelected ] != curSong ) {
380+ if (curSong . instSuffix != prevInstSuffix ) {
380381 autoplayElapsed = 0 ;
381382 songInstPlaying = false ;
382383 }
383384 #end
384385
385- if (curSong .difficulties .length > 1 )
386- diffText .text = ' < ${curSong .difficulties [curDifficulty ].toUpperCase ()} >' ;
386+ if (song .difficulties .length > 1 )
387+ diffText .text = ' < ${song .difficulties [curDifficulty ].toUpperCase ()} >' ;
387388 else
388- diffText .text = validDifficulties ? curSong .difficulties [curDifficulty ].toUpperCase () : " -" ;
389+ diffText .text = validDifficulties ? song .difficulties [curDifficulty ].toUpperCase () : " -" ;
389390 }
390391
391392 function updateScore () {
0 commit comments