From fafe157a705023528d4be5b764b86042ab7d3a9d Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Fri, 11 Jul 2025 18:37:47 -0400 Subject: [PATCH] Update the variation list when switching difficulties forces a song switch. --- source/funkin/ui/freeplay/FreeplayState.hx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/funkin/ui/freeplay/FreeplayState.hx b/source/funkin/ui/freeplay/FreeplayState.hx index 34248a214..87ab9774b 100644 --- a/source/funkin/ui/freeplay/FreeplayState.hx +++ b/source/funkin/ui/freeplay/FreeplayState.hx @@ -2267,9 +2267,13 @@ class FreeplayState extends MusicBeatSubState // For when we change the difficulty, but the song doesn't have that difficulty! if (daSong != null && !songDifficulties.contains(difficultiesAvailable[currentDifficultyIndex])) { + // Switch to the closest song with that difficulty. curSelected = findClosestDiff(characterVariations, difficultiesAvailable[currentDifficultyIndex]); daSong = grpCapsules.members[curSelected].freeplayData; rememberedSongId = daSong?.data.id; + + // Update the variation list for the new song. + characterVariations = daSong?.data.getVariationsByCharacter(currentCharacter) ?? Constants.DEFAULT_VARIATION_LIST; } for (variation in characterVariations)