Skip to content

Commit

Permalink
Fix heart collect logic
Browse files Browse the repository at this point in the history
  • Loading branch information
swoolcock committed Jun 4, 2020
1 parent 9080f55 commit 946321f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions osu.Game.Rulesets.Rush/Objects/Drawables/DrawableHeart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,20 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)

var result = HitObject.HitWindows.ResultFor(timeOffset);

// if we've manually hit it, assume it's ok
if (userTriggered && result != HitResult.None)
if (userTriggered)
{
ApplyResult(r => r.Type = HitResult.Perfect);
if (result != HitResult.None)
ApplyResult(r => r.Type = HitResult.Perfect);

return;
}

// if we haven't reached the perfect range, do nothing
if (timeOffset < 0 && result != HitResult.Perfect)
// if we haven't passed the hitobject time, do nothing
if (timeOffset < 0)
return;

// if we've passed the object and can longer hit it, miss
if (timeOffset >= 0 && !HitObject.HitWindows.CanBeHit(timeOffset))
if (result == HitResult.None)
ApplyResult(r => r.Type = HitResult.Miss);

// else if we're still able to hit it, check if the player is in the correct lane
Expand Down

0 comments on commit 946321f

Please sign in to comment.