[BUGFIX] Made changeDiff
not use the suffixed difficulty as the current difficulty on freeplay
#3469
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Does this PR close any issues? If so, link them below.
Nope.
Briefly describe the issue(s) fixed.
In the
changeDiff
method ofFreeplayState
, when the current song isn't "Random",rememberedDifficulty
gets assigned to the suffixed version ofcurrentDifficulty
instead ofcurrentDifficulty
itself. Later, whengenerateSongList
gets called,currentDifficulty
gets assigned torememberedDifficulty
, which meanscurrentDifficulty
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", and even make freeplay display the remembered song incorrectly when coming back from another state. I'm using the term "custom difficulties" because the
pico
andbf
variations are somehow not affected by any of this. Nevertheless, the fix I have here preventsrememberedDifficulty
from getting assigned to the suffixed version ofcurrentDifficulty
in thechangeDiff
method and fixes all of the problems without affecting thepico
andbf
variations.Include any relevant screenshots or videos.
Before
Bugs.Showcase.Before.mp4
After
As you can see at the end of the video, the
bf
variation in "Darnell (BF Mix)" doesn't get affected by this fix, and is still selectable. I also checked this in the pico remixes and everything there works the same.PR.Fix.Showcase.After.mp4