-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Show distance snap at current point in time (and add ability to set as usable value) #20854
Conversation
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.
What is in this pull seems to be working pretty alright, small quibbles aside. Not sure what is up with the TODOs, though.
@@ -112,6 +112,14 @@ public override string ConvertSelectionToString() | |||
|
|||
private RectangularPositionSnapGrid rectangularPositionSnapGrid; | |||
|
|||
protected override double ReadCurrentDistanceSnap(HitObject before, HitObject after) |
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.
Spinners throw a bit of a wrench into this, the function proposes distance spacings for spinners that are a bit nonsense (likely because spinners technically have a "position" in the middle of the playfield). May want to prevent proposing a spacing if one of the objects is a spinner.
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 think I'd probably leave this for now as "working as intended", based on the gameplay direction where we want to allow non-centered spinners.
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
// osu!catch's distance snap implementation is limited, in that a custom spacing cannot be specified. | ||
// Therefore this functionality is not currently used. | ||
// | ||
// The implementation below is probably correct but should be checked if/when exposed via controls. | ||
|
||
float expectedDistance = DurationToDistance(before, after.StartTime - before.GetEndTime()); | ||
float actualDistance = Math.Abs(((CatchHitObject)before).EffectiveX - ((CatchHitObject)after).EffectiveX); | ||
|
||
return actualDistance / expectedDistance; |
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 think this is going to only be correct for single fruits, and be wrong for juice streams (where before.EndX
should be used) and even more wrong for banana showers (god knows what should be used there, X of last banana in shower?). But given there's no way to test as is anyway I think I'm going to let that slide as out of scope for the time being...
RFC, working with what I have for the UI.
osu!stable shows "prev" and "next" values (based on selection), but this time i've tried showing the current instead.