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 "omit barline" sometimes not applying correctly #22754

Merged
merged 4 commits into from
Mar 7, 2023

Conversation

peppy
Copy link
Member

@peppy peppy commented Feb 28, 2023

This is an alternative to #22582, which increases the scope of change but reduces the complexity.

Taken from that PR:

In stable, inherited points cannot set the omit barline effect, the checkbox is grayed out.
Usually, inherited points would inherit the omit barline effect setting from its uninherited parent, but this is not always the case, as with the map in the aforementioned issue

It contains these two lines

11992,228.136882129278,4,1,0,90,1,8
11992,-136.979166666667,4,1,0,90,0,0

By moving the specification to the more correct location of TimingControlPoint, we can resolve this issue without too much extra thought.

These changes were taken from ppy#22582.

Minor adjustments were applied to match stable expectations, which is to
say there cannot be an inherited control point with omit barline
specification (in the editor the setting is greyed out when inheritance
is turned on).
@peppy
Copy link
Member Author

peppy commented Feb 28, 2023

@sw1tchbl4d3r Please take a look at this and see how it looks to you. During RL discussion it was touched on that the previous PR was very complicated to understand and review. I think this approach feels better (and is a better direction in terms of exposing the setting to the user in the editor).

@peppy peppy added the area:beatmap-parsing .osu file format parsing label Feb 28, 2023
@sw1tchbl4d3r
Copy link
Member

This is definitely the better approach, was worried a sudden change of a property like this might break older lazer-made maps that rely on the property being part of the effect point, but this still needs some work in the editor, in particular this:
barline

The full info "badge" gets too long to fit in the section and gets moved downwards, which results in this weird displaying of the property.

@peppy
Copy link
Member Author

peppy commented Mar 2, 2023

I've fixed the layout issue with this one, so it should be good to go.

Copy link
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

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

Definitely think this is much better (read: easier to digest) than the alternative PR.

Seeing that IRL discussions were mentioned above, I'm unsure if I'm allowed to just merge this or if I should wait for another opinion. I will say that I am relying on unit tests here and have not done much further testing on the ranked beatmap corpus (if that is something you want me to do, then let me know).

@@ -230,10 +231,10 @@ void outputControlPointAt(double time, bool isTimingPoint)
LegacyEffectFlags effectFlags = LegacyEffectFlags.None;
if (effectPoint.KiaiMode)
effectFlags |= LegacyEffectFlags.Kiai;
if (effectPoint.OmitFirstBarLine)
if (timingPoint.OmitFirstBarLine)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Of note, this is a subtler-than-apparent change which makes it so that if the problematic beatmap mentioned in the issue is re-exported using lazer's editor, it will auto-fix itself, as in the problematic inherited point will have the omit bar line flag set after export. Which is neat, but also technically breaks import-export stability. But I think that's fine.

@peppy
Copy link
Member Author

peppy commented Mar 7, 2023

@bdach if you're confident it's likely fine to go ahead and merge. the RL discussion was mostly very shallow smoogi:"other PR is complex" me:"yeah but i think i have a cleaner alternative let me do that instead".

@bdach bdach enabled auto-merge March 7, 2023 21:46
@bdach bdach merged commit 1a6433e into ppy:master Mar 7, 2023
@peppy peppy deleted the omit-barline-in-timing-control-point branch March 8, 2023 10:20
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/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Barlines doesn't hide
3 participants