From 09fdd0c91ef6e5eabb92b13fcd3e18fd3524c64e Mon Sep 17 00:00:00 2001 From: kade-github <26305836+Kade-github@users.noreply.github.com> Date: Thu, 17 Apr 2025 13:37:14 -0700 Subject: [PATCH] going to erect with the erect takes you to the closest erect --- source/funkin/ui/freeplay/FreeplayState.hx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/funkin/ui/freeplay/FreeplayState.hx b/source/funkin/ui/freeplay/FreeplayState.hx index 6b817f91c..39663ca05 100644 --- a/source/funkin/ui/freeplay/FreeplayState.hx +++ b/source/funkin/ui/freeplay/FreeplayState.hx @@ -768,6 +768,7 @@ class FreeplayState extends MusicBeatSubState rememberSelection(); changeSelection(); refreshCapsuleDisplays(); + } /** @@ -1669,7 +1670,8 @@ class FreeplayState extends MusicBeatSubState { var song:Null = grpCapsules.members[index].freeplayData; if (song == null) continue; - var songDiff:Null = song.data.getDifficulty(diff, null, characterVariations)?.difficulty; + var characterVar = song.data.getVariationsByCharacter(currentCharacter); + var songDiff:Null = song.data.getDifficulty(diff, null, characterVar)?.difficulty; // if the difference between the current index and this index is the smallest so far, // take this one as the closest index. (By comparing with the closest variable) var c:Int = curSelected - index; @@ -1717,10 +1719,8 @@ class FreeplayState extends MusicBeatSubState // For when we change the difficulty, but the song doesn't have that difficulty! if (!songDifficulties.contains(difficultiesAvailable[currentDifficultyIndex])) { - // If the current difficulty is not available, find the closest one that is. - characterVariations.push("erect"); curSelected = findClosestDiff(characterVariations, difficultiesAvailable[currentDifficultyIndex]); - rememberedSongId = grpCapsules.members[curSelected].freeplayData?.data.id ?? rememberedSongId; + rememberedSongId = grpCapsules.members[curSelected].freeplayData?.data.id; } for (variation in characterVariations) @@ -2107,7 +2107,7 @@ class FreeplayState extends MusicBeatSubState } #end instSuffix = (instSuffix != '') ? '-$instSuffix' : ''; - trace('Attempting to play partial preview: ${previewSong.id}:${instSuffix}'); + // trace('Attempting to play partial preview: ${previewSong.id}:${instSuffix}'); FunkinSound.playMusic(previewSong.id, { startingVolume: 0.0,