From e5673549cf7c17c58dfc340279c4ac0ed4377dd7 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Thu, 12 Sep 2024 15:38:20 -0400 Subject: [PATCH] Fix issues with the difficulty selector showing non-existant difficulties in Freeplay --- source/funkin/ui/freeplay/FreeplayState.hx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/funkin/ui/freeplay/FreeplayState.hx b/source/funkin/ui/freeplay/FreeplayState.hx index a908e54c6..ec80a1ff6 100644 --- a/source/funkin/ui/freeplay/FreeplayState.hx +++ b/source/funkin/ui/freeplay/FreeplayState.hx @@ -354,10 +354,6 @@ class FreeplayState extends MusicBeatSubState if (availableDifficultiesForSong.length == 0) continue; songs.push(new FreeplaySongData(levelId, songId, song, displayedVariations)); - for (difficulty in availableDifficultiesForSong) - { - diffIdsTotal.pushUnique(difficulty); - } for (difficulty in unsuffixedDifficulties) { diffIdsTotal.pushUnique(difficulty); @@ -1764,12 +1760,13 @@ class FreeplayState extends MusicBeatSubState var songScore:Null = Save.instance.getSongScore(daSong.songId, suffixedDifficulty); intendedScore = songScore?.score ?? 0; intendedCompletion = songScore == null ? 0.0 : ((songScore.tallies.sick + songScore.tallies.good) / songScore.tallies.totalNotes); - rememberedDifficulty = currentDifficulty; + rememberedDifficulty = suffixedDifficulty; } else { intendedScore = 0; intendedCompletion = 0.0; + rememberedDifficulty = currentDifficulty; } if (intendedCompletion == Math.POSITIVE_INFINITY || intendedCompletion == Math.NEGATIVE_INFINITY || Math.isNaN(intendedCompletion))