ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15k stars 2.21k forks source link

Sometimes undo slider changes set the anchor type to bezier #28888

Closed cihe13375 closed 5 days ago

cihe13375 commented 1 month ago

Type

Game behaviour

Bug description

1) create a straight slider 2) change the first anchor type to perfect curve 3) add an anchor in the middle 4) drag the new anchor 5) ctrl+z twice 6) note that the first anchor type becomes bezier.

Also it can be seen that the slider is somehow extended when changing the anchor type in step (2), though idk if that's a bug.

Screenshots or videos

https://github.com/user-attachments/assets/0c3c3eb5-48bc-4917-bb2f-383431804c6d

Version

2024.625.2 (the video is recorded on a custom build but I can confirm the issue also exists on 2024.625.2 official release)

Logs

-

bdach commented 1 month ago

This is happening because the following part of beatmap decoder is running interference:

https://github.com/ppy/osu/blob/5633297d1c04a539abb0a46b921b4a2c951631e8/osu.Game/Rulesets/Objects/Legacy/ConvertHitObjectParser.cs#L346-L358

I'm not sure what the solution is here. A better serialisation format with no silent coercions of this sort, perhaps. Or a better editor change tracking system that does not rely on encoding/decoding the beatmap. Neither is probably happening in the nearest months.

@smoogipoo any better ideas?

smoogipoo commented 1 month ago

Other than perhaps using the beatmap version if that's even available, I don't have any better ideas right now.