Fix glitchy path type correction for sliders in the editor #26512
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.
Fixes an issue in the mechanism responsible for turning the path type to bezier when the perfect curve circle radius is too large.
Right now it triggers the correction at the end of the frame which is after the slider body is drawn which causes a flickering behaviour. Also it could result in retaining the slider length of the perfect curve slider which makes the slider go way off-screen.
The fix is to explicitly apply the correction immediately after each batch operation on the slider path. The timing for this is quite precise because if you do it after the slider path recalculates, it will cause the slider length issue.
Potential other solution is to allow batching of operations right in
SliderPath
itself, so theVersion
only changes after your whole batch operation is done. However I dislike complicatingSliderPath
even further.osu.Game.Rulesets.Osu.Tests_rKl5pw51G0.mp4
After
osu.Game.Rulesets.Osu.Tests_vEFTrVGF9Y.mp4