From 8045534fa511d93b9e9be5c5b98ff2e2369c9bcb Mon Sep 17 00:00:00 2001 From: ekrctb Date: Mon, 26 Jul 2021 18:18:24 +0900 Subject: [PATCH] Remove outdated comment and simplify code --- osu.Game.Rulesets.Catch/UI/Catcher.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/osu.Game.Rulesets.Catch/UI/Catcher.cs b/osu.Game.Rulesets.Catch/UI/Catcher.cs index 49508b1caf..b724b84a56 100644 --- a/osu.Game.Rulesets.Catch/UI/Catcher.cs +++ b/osu.Game.Rulesets.Catch/UI/Catcher.cs @@ -218,14 +218,9 @@ namespace osu.Game.Rulesets.Catch.UI if (!(hitObject is PalpableCatchHitObject fruit)) return false; - var halfCatchWidth = catchWidth * 0.5f; - - // this stuff wil disappear once we move fruit to non-relative coordinate space in the future. - var catchObjectPosition = fruit.EffectiveX; - var catcherPosition = Position.X; - - return catchObjectPosition >= catcherPosition - halfCatchWidth && - catchObjectPosition <= catcherPosition + halfCatchWidth; + float halfCatchWidth = catchWidth * 0.5f; + return fruit.EffectiveX >= X - halfCatchWidth && + fruit.EffectiveX <= X + halfCatchWidth; } public void OnNewResult(DrawableCatchHitObject drawableObject, JudgementResult result)