From 946321fef3e89210dc8986683ee6a0d1324fcb60 Mon Sep 17 00:00:00 2001 From: Shane Woolcock Date: Thu, 4 Jun 2020 20:27:48 +0930 Subject: [PATCH] Fix heart collect logic --- .../Objects/Drawables/DrawableHeart.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/osu.Game.Rulesets.Rush/Objects/Drawables/DrawableHeart.cs b/osu.Game.Rulesets.Rush/Objects/Drawables/DrawableHeart.cs index 99b984a..fec59a3 100644 --- a/osu.Game.Rulesets.Rush/Objects/Drawables/DrawableHeart.cs +++ b/osu.Game.Rulesets.Rush/Objects/Drawables/DrawableHeart.cs @@ -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