Skip to content

Commit

Permalink
[BUGFIX] Made changeDiff not use the suffixed difficulty as the cur…
Browse files Browse the repository at this point in the history
…rent difficulty on freeplay

In the `changeDiff` method of `FreeplayState`, when the current song isn't "Random", `rememberedDifficulty` gets assigned to the suffixed version of  `currentDifficulty` instead of `currentDifficulty` itself. Later, when `generateSongList` gets called, `currentDifficulty` gets assigned to `rememberedDifficulty`, which means `currentDifficulty` changed to its suffixed version.

Because difficulty selection in freeplay doesn't use the suffixed versions of the difficulties, adding the suffix creates some bugs. From my testing (which I recorded a video of), I found that the bugs prevent freeplay from selecting custom difficulties on variations other than "default" and "erect".
  • Loading branch information
AppleHair authored Sep 27, 2024
1 parent ec749c7 commit 899ed7f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source/funkin/ui/freeplay/FreeplayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1785,14 +1785,13 @@ class FreeplayState extends MusicBeatSubState
var songScore:Null<SaveScoreData> = 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 = suffixedDifficulty;
}
else
{
intendedScore = 0;
intendedCompletion = 0.0;
rememberedDifficulty = currentDifficulty;
}
rememberedDifficulty = currentDifficulty;

if (intendedCompletion == Math.POSITIVE_INFINITY || intendedCompletion == Math.NEGATIVE_INFINITY || Math.isNaN(intendedCompletion))
{
Expand Down

0 comments on commit 899ed7f

Please sign in to comment.