Fix extended values in difficulty adjust being truncated to 10 on beatmap change #21541
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.
Closes #21539.
Regressed in a243842. It was not fine to reorder the base call :(
The failure site exposing this is here:
osu/osu.Game/Rulesets/Mods/DifficultyAdjustSettingsControl.cs
Lines 41 to 53 in e47f933
The
.GetBoundCopy()
call here would causeCurrentNumber
to be clamped to 10, on both sides of the bind.Cause is similar (but not 100% exactly the same) as ppy/osu-framework#5542. All bounds that may clamp the values in the bindable need to be transferred prior to the value, to ensure clamping does not occur in the process of copying values across.
This PR uses the solution from the review comment linked above, with requisite test coverage. I won't pretend it's not ugly, but I don't know how to make it not-ugly without upending more stuff than could be considered reasonable.