From 95891bc6550180c5a3959ebcb3122a8712e8da2d Mon Sep 17 00:00:00 2001 From: Darius Wattimena Date: Thu, 18 Nov 2021 20:03:41 +0100 Subject: [PATCH] Moved clear plate logic to Catcher class --- osu.Game.Rulesets.Catch/UI/Catcher.cs | 9 +++++++++ osu.Game.Rulesets.Catch/UI/CatcherArea.cs | 13 ------------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/osu.Game.Rulesets.Catch/UI/Catcher.cs b/osu.Game.Rulesets.Catch/UI/Catcher.cs index 2a13190cc5..0b041da076 100644 --- a/osu.Game.Rulesets.Catch/UI/Catcher.cs +++ b/osu.Game.Rulesets.Catch/UI/Catcher.cs @@ -210,8 +210,17 @@ namespace osu.Game.Rulesets.Catch.UI catchResult.CatcherAnimationState = CurrentState; catchResult.CatcherHyperDash = HyperDashing; + // Ignore JuiceStreams and BananaShowers if (!(drawableObject is DrawablePalpableCatchHitObject palpableObject)) return; + if (palpableObject.HitObject.LastInCombo) + { + if (result.Judgement is CatchJudgement catchJudgement && catchJudgement.ShouldExplodeFor(result)) + Explode(); + else + Drop(); + } + var hitObject = palpableObject.HitObject; if (result.IsHit) diff --git a/osu.Game.Rulesets.Catch/UI/CatcherArea.cs b/osu.Game.Rulesets.Catch/UI/CatcherArea.cs index 0cbabac911..37002d1051 100644 --- a/osu.Game.Rulesets.Catch/UI/CatcherArea.cs +++ b/osu.Game.Rulesets.Catch/UI/CatcherArea.cs @@ -6,7 +6,6 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Input.Bindings; using osu.Framework.Input.Events; -using osu.Game.Rulesets.Catch.Judgements; using osu.Game.Rulesets.Catch.Objects.Drawables; using osu.Game.Rulesets.Catch.Replays; using osu.Game.Rulesets.Judgements; @@ -71,18 +70,6 @@ namespace osu.Game.Rulesets.Catch.UI public void OnNewResult(DrawableCatchHitObject hitObject, JudgementResult result) { Catcher.OnNewResult(hitObject, result); - - // Ignore JuiceStreams and BananaShowers - if (!(hitObject is DrawablePalpableCatchHitObject)) return; - - if (hitObject.HitObject.LastInCombo) - { - if (result.Judgement is CatchJudgement catchJudgement && catchJudgement.ShouldExplodeFor(result)) - Catcher.Explode(); - else - Catcher.Drop(); - } - comboDisplay.OnNewResult(hitObject, result); }