-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 mania notes disappearing on seek to their end time #30755
Conversation
@@ -82,6 +85,9 @@ public ManiaPlayfield(List<StageDefinition> stageDefinitions) | |||
} | |||
} | |||
|
|||
[Pure] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This annotation is supposed to assuage doubts that may pop up from the "virtual call in ctor" hint-level inspections resulting from this change.
var action = columnStartAction; | ||
columnStartAction++; | ||
var column = CreateColumn(firstColumnIndex + i, isSpecial).With(c => | ||
{ | ||
RelativeSizeAxes = Axes.Both, | ||
Width = 1, | ||
Action = { Value = columnStartAction++ } | ||
}; | ||
c.RelativeSizeAxes = Axes.Both; | ||
c.Width = 1; | ||
c.Action.Value = action; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm only sorta confident the columnStartAction
changes here are correct. Remember, friends don't let friends use postfix increment in complex expressions. (Ideally ever.)
The rearranging is required because you can't do stuff to ref
params from inside a closure.
a898da3
to
15a8cfe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably what I would've done too.
RFC. Would close #30639.
Not too sold on this myself, but it appears to work well enough for a hack.
Options I also considered but didn't end up going through with:
ManiaHitObject
(smelled of twisting gameplay code to editor needs)DrawableEditorRulesetWrapper
to press keys 1ms late instead (no easy entry point to do this, would need to create yet another virtual onRuleset
rather than leveraging existing structures, even though this change ended up doing two levels of virtuals)