-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Refactor OsuDifficultyHitObject for readability/understandability #15774
Merged
peppy
merged 15 commits into
ppy:master
from
smoogipoo:refactor-osu-difficulty-hit-object
Dec 9, 2021
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e67d9b1
Reorder members a bit
smoogipoo 402de75
Make TravelDistance/TravelTime apply to the current object
smoogipoo e07c44d
Reword comment with a more diagrammatical explanation
smoogipoo a081038
Normalized -> Normalised
smoogipoo b5747f3
Reword xmldocs
smoogipoo 274444e
Add additional information to diagram
smoogipoo b20ff22
Ensure travel distance is calculated for all sliders
smoogipoo 3e4b774
Invert lines for better chronological order
smoogipoo 7c3d1d6
Merge branch 'master' into refactor-osu-difficulty-hit-object
smoogipoo ded8628
Rename + better documentation
smoogipoo 7c0f7b1
Use "x" for cursor position in diagrams
smoogipoo 814f072
Use new LazyJumpDistance terminology in documentation
smoogipoo 1110412
Restructure doc for easier readability
smoogipoo 1a09a34
Merge branch 'master' into refactor-osu-difficulty-hit-object
smoogipoo 99991a6
Minor cleanups, unifying wording a bit more
smoogipoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Confirm that this is still correct as
osuLastObj
here? Looks weird with the changes inside this conditional now reading from one index back while the conditional itself isn't.(it probably is, just a hard change to read due to how complex things are)
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 is one of the reasons for me changing it, because it was using
osuCurrObj.TravelDistance
to access the travel distance ofosuLastObj
.So yes, this condition is still fine as it is, the only change is that the properties apply directly to the relevant hitobject now.
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.
To add on as to why - all these blocks of code try to do (perhaps not explained enough in the leading comments?) is to calculate the velocity through a previous slider into the current object. One part is stored in the previous object (travel), and the other is stored in the current object (jump / movement, however you want to think about it).