-
-
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
Allow a JudgementProcessor
to provide a rate-scaled time offset of a JudgementResult
#30842
base: master
Are you sure you want to change the base?
Conversation
…a `JudgementResult` Closes ppy#30828. I'm not convinced this is the absolute cleanest solution, but I've made it in such a way that it doesn't require too much messing around with hit/judgement processing.
/// <param name="hitObject">The <see cref="HitObject"/> that triggered the event.</param> | ||
/// <param name="lastHitObject">The previous <see cref="HitObject"/>.</param> | ||
/// <param name="position">A position corresponding to the event.</param> | ||
public HitEvent(double timeOffset, double? gameplayRate, HitResult result, HitObject hitObject, [CanBeNull] HitObject lastHitObject, [CanBeNull] Vector2? position) | ||
public HitEvent(double timeOffset, double scaledTimeOffset, HitResult result, HitObject hitObject, [CanBeNull] HitObject lastHitObject, [CanBeNull] Vector2? position) |
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 feels really bad. Having two fields that are tied together by some factor does not sound like a good structure.
Looking at the diff at face value, is it not possible to just keep the gameplayRate
variable but override ManiaScoreProcessor
to always provide 1 instead of the actual gameplay rate itself? This of course comes with repurposing of the variable's name and docs so the code doesn't look weird. Something like renaming gameplayRate
to timeScale
or otherwise with explanatory docs.
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.
Your suggestion was my first approach but it felt weird due to it being called gameplayRate
. Something like timeScale
sounds a lot better.
Worth noting there is debate in the original issue on whether it's valid in the first place. I don't have any personal opinion on the matter, but I'll wait for any decision on that before pushing this further. |
Marking as blocked pending conclusion of discussion in issue |
Closes #30828.
I'm not convinced this is the absolute cleanest solution, but I've made it in such a way that it doesn't require too much messing around with hit/judgement processing.
Result (verifies the unstable rate is correctly scaled when compared to the issue)