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

Set Correct values for addDelayedMovements() function #2308

Merged
merged 6 commits into from Apr 2, 2018
Merged

Set Correct values for addDelayedMovements() function #2308

merged 6 commits into from Apr 2, 2018

Conversation

johnneijzen
Copy link
Contributor

@johnneijzen johnneijzen commented Mar 24, 2018

it is duplicate from the one on line 97.

@smoogipoo
Copy link
Contributor

smoogipoo commented Mar 24, 2018

Here's the relevant code from osu!stable:

//Make the cursor stay at a hitObject as long as possible (mainly for autopilot).
if (h.StartTime - HitObjectManager.HITTABLE_RANGE > last.EndTime + hitObjectManager.HitWindow50 + 50)
{
    if (!(last is Spinner) && h.StartTime - last.EndTime < 1000) AddFrameToReplay(replay, new bReplayFrame(last.EndTime + hitObjectManager.HitWindow50, last.EndPosition.X, last.EndPosition.Y, pButtonState.None));
    if (!(h is Spinner)) AddFrameToReplay(replay, new bReplayFrame(h.StartTime - HitObjectManager.HITTABLE_RANGE, h.Position.X, h.Position.Y, pButtonState.None));
}
else if (h.StartTime - hitObjectManager.HitWindow50 > last.EndTime + hitObjectManager.HitWindow50 + 50)
{
    if (!(last is Spinner) && h.StartTime - last.EndTime < 1000) AddFrameToReplay(replay, new bReplayFrame(last.EndTime + hitObjectManager.HitWindow50, last.EndPosition.X, last.EndPosition.Y, pButtonState.None));
    if (!(h is Spinner)) AddFrameToReplay(replay, new bReplayFrame(h.StartTime - hitObjectManager.HitWindow50, h.Position.X, h.Position.Y, pButtonState.None));
}
else if (h.StartTime - hitObjectManager.HitWindow100 > last.EndTime + hitObjectManager.HitWindow100 + 50)
{
    if (!(last is Spinner) && h.StartTime - last.EndTime < 1000) AddFrameToReplay(replay, new bReplayFrame(last.EndTime + hitObjectManager.HitWindow100, last.EndPosition.X, last.EndPosition.Y, pButtonState.None));
    if (!(h is Spinner)) AddFrameToReplay(replay, new bReplayFrame(h.StartTime - hitObjectManager.HitWindow100, h.Position.X, h.Position.Y, pButtonState.None));
}

It looks like one of these conditionals is wrong.

Copy link
Contributor

@smoogipoo smoogipoo left a comment

Choose a reason for hiding this comment

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

As commented.

@johnneijzen
Copy link
Contributor Author

i have look up HitResult
HitResult.Great = 300
HitResult.Good = 100
HitResult.Meh = 50
HitResult.Miss = 0

based on osu!stable code I think
first condition supposed to be HitResult.Miss
second condition supposed to be HitResult.Meh
third condition supposed to be HitResult.Good

@smoogipoo
Copy link
Contributor

Sounds about right

@johnneijzen johnneijzen changed the title Remove duplicate condition Change duplicate condition to HitResult.Good instead of HitResult.Meh Mar 24, 2018
@johnneijzen
Copy link
Contributor Author

Found Cause of this mistake it happen during this commit
b15f184#diff-6a517b1f5ef61bdcc38d771d55109c98

@johnneijzen johnneijzen changed the title Change duplicate condition to HitResult.Good instead of HitResult.Meh Set Correct values for addDelayedMovements() function Mar 24, 2018
@smoogipoo smoogipoo modified the milestones: Candidate Issues, April 2018 Apr 2, 2018
@smoogipoo
Copy link
Contributor

Good stuff.

@smoogipoo smoogipoo merged commit ad4f38f into ppy:master Apr 2, 2018
@johnneijzen johnneijzen deleted the Small-Clean-Up branch April 2, 2018 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants