From 233d45e18508eac8e5544534cdb65f773d02be9c Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 15 Nov 2022 18:22:27 +0900 Subject: [PATCH] Fix argon swells incorrectly flashing on every hit --- .../Skinning/Argon/ArgonCirclePiece.cs | 8 ++++++-- osu.Game.Rulesets.Taiko/Skinning/Default/CirclePiece.cs | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonCirclePiece.cs b/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonCirclePiece.cs index 22f96da61e..c22c0e9e79 100644 --- a/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonCirclePiece.cs +++ b/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonCirclePiece.cs @@ -9,6 +9,7 @@ using osu.Framework.Graphics.Shapes; using osu.Game.Beatmaps.ControlPoints; using osu.Game.Graphics.Containers; using osu.Game.Rulesets.Objects.Drawables; +using osu.Game.Rulesets.Taiko.Objects; using osuTK.Graphics; namespace osu.Game.Rulesets.Taiko.Skinning.Argon @@ -81,12 +82,15 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Argon updateStateTransforms(drawableHitObject, drawableHitObject.State.Value); } - private void updateStateTransforms(DrawableHitObject drawableHitObject, ArmedState state) + private void updateStateTransforms(DrawableHitObject h, ArmedState state) { + if (h.HitObject is not Hit) + return; + switch (state) { case ArmedState.Hit: - using (BeginAbsoluteSequence(drawableHitObject.HitStateUpdateTime)) + using (BeginAbsoluteSequence(h.HitStateUpdateTime)) { flash.FadeTo(0.9f).FadeOut(500, Easing.OutQuint); } diff --git a/osu.Game.Rulesets.Taiko/Skinning/Default/CirclePiece.cs b/osu.Game.Rulesets.Taiko/Skinning/Default/CirclePiece.cs index ccde8e6ac9..7ddc413d98 100644 --- a/osu.Game.Rulesets.Taiko/Skinning/Default/CirclePiece.cs +++ b/osu.Game.Rulesets.Taiko/Skinning/Default/CirclePiece.cs @@ -153,12 +153,15 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Default updateStateTransforms(drawableHitObject, drawableHitObject.State.Value); } - private void updateStateTransforms(DrawableHitObject drawableHitObject, ArmedState state) + private void updateStateTransforms(DrawableHitObject h, ArmedState state) { + if (h.HitObject is not Hit) + return; + switch (state) { case ArmedState.Hit: - using (BeginAbsoluteSequence(drawableHitObject.HitStateUpdateTime)) + using (BeginAbsoluteSequence(h.HitStateUpdateTime)) flashBox.FadeTo(0.9f).FadeOut(300); break; }