diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModHidden.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModHidden.cs index ad17955f75..2c3b4a8d18 100644 --- a/osu.Game.Rulesets.Taiko/Mods/TaikoModHidden.cs +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModHidden.cs @@ -57,12 +57,6 @@ namespace osu.Game.Rulesets.Taiko.Mods { hitObject.FadeOut(duration); - // Keep updating the object even after it stopped being visible. - // This is required because of the custom logic in DrawableHit's Update method. - // Specifically, pressHandledThisFrame wasn't reset, which caused further hits - // within the object's lifetime to be rejected. - hitObject.AlwaysPresent = true; - // DrawableHitObject sets LifetimeEnd to LatestTransformEndTime if it isn't manually changed. // in order for the object to not be killed before its actual end time (as the latest transform ends earlier), set lifetime end explicitly. hitObject.LifetimeEnd = state == ArmedState.Idle || !hitObject.AllJudged diff --git a/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableHit.cs b/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableHit.cs index 44225ab289..1ef426854e 100644 --- a/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableHit.cs +++ b/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableHit.cs @@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables private bool validActionPressed; - private bool pressHandledThisFrame; + private double? lastPressHandleTime; private readonly Bindable type = new Bindable(); @@ -76,7 +76,8 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables HitActions = null; HitAction = null; - validActionPressed = pressHandledThisFrame = false; + validActionPressed = false; + lastPressHandleTime = null; } private void updateActionsFromType() @@ -114,7 +115,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables public override bool OnPressed(KeyBindingPressEvent e) { - if (pressHandledThisFrame) + if (lastPressHandleTime == Time.Current) return true; if (Judged) return false; @@ -128,7 +129,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables // Regardless of whether we've hit or not, any secondary key presses in the same frame should be discarded // E.g. hitting a non-strong centre as a strong should not fall through and perform a hit on the next note - pressHandledThisFrame = true; + lastPressHandleTime = Time.Current; return result; } @@ -139,15 +140,6 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables base.OnReleased(e); } - protected override void Update() - { - base.Update(); - - // The input manager processes all input prior to us updating, so this is the perfect time - // for us to remove the extra press blocking, before input is handled in the next frame - pressHandledThisFrame = false; - } - protected override void UpdateHitStateTransforms(ArmedState state) { Debug.Assert(HitObject.HitWindows != null);