Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix consecutive perfect curve segments not being loaded properly #12310

Merged
merged 2 commits into from
Apr 6, 2021

Conversation

FamousPig
Copy link
Contributor

@FamousPig FamousPig commented Apr 6, 2021

Related to #11885

Prior to his PR, trying to load(or undo/redo) consecutive (valid 3-point) perfect-curve segments like this:

perfect-curve-1

results in all control points being reverted to bezier:

perfect-curve-2

This PR fixes this issue by always encoding perfect curves as explicit segments.

Test coverage is provided by the extended test as well as LegacyBeatmapEncoderTest.TestEncodeDecodeStability(), which uses multi-segment-slider.osu

Copy link
Contributor

@smoogipoo smoogipoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks!

@smoogipoo
Copy link
Contributor

Does this completely close the mentioned issue?

@FamousPig
Copy link
Contributor Author

The issue talks about usability concerns in the comments that are not addressed here. As it stands 4-point "perfect curves"(that fall back to bezier calculation) can still be created and will be reverted to bezier on reload.

@smoogipoo smoogipoo added area:beatmap-parsing .osu file format parsing ruleset/osu! and removed ruleset/osu! labels Apr 6, 2021
@smoogipoo smoogipoo merged commit 1c7aa71 into ppy:master Apr 6, 2021
@FamousPig FamousPig deleted the perfect-curve-undo branch April 6, 2021 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:beatmap-parsing .osu file format parsing size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants