From 010262c764cbcd58280f2b209a541476068f078f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 30 Jun 2023 17:50:32 +0900 Subject: [PATCH] Change strong hit sample handling to be user input based, not hit object based --- .../Skinning/Argon/ArgonDrumSamplePlayer.cs | 7 +++---- osu.Game.Rulesets.Taiko/UI/DrumSamplePlayer.cs | 2 +- osu.Game.Rulesets.Taiko/UI/DrumSampleTriggerSource.cs | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonDrumSamplePlayer.cs b/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonDrumSamplePlayer.cs index a692260f10..5996ba2d05 100644 --- a/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonDrumSamplePlayer.cs +++ b/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonDrumSamplePlayer.cs @@ -27,7 +27,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Argon // TODO: pool flourish sample } - public override void Play(HitType hitType) + public override void Play(HitType hitType, bool strong) { TaikoHitObject? hitObject = GetMostValidObject() as TaikoHitObject; @@ -39,14 +39,13 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Argon // If the sample is provided by a legacy skin, we should not try and do anything special. if (skinSource.FindProvider(s => s.GetSample(baseSample) != null) is LegacySkin) { - base.Play(hitType); + base.Play(hitType, strong); return; } // let the magic begin... - // TODO: should we only play strong samples if the user correctly hits them? arguable. - if ((hitObject as TaikoStrongableHitObject)?.IsStrong == true || hitObject is StrongNestedHitObject) + if (strong) { PlaySamples(new ISampleInfo[] { diff --git a/osu.Game.Rulesets.Taiko/UI/DrumSamplePlayer.cs b/osu.Game.Rulesets.Taiko/UI/DrumSamplePlayer.cs index 99449ecbda..dba61a9b41 100644 --- a/osu.Game.Rulesets.Taiko/UI/DrumSamplePlayer.cs +++ b/osu.Game.Rulesets.Taiko/UI/DrumSamplePlayer.cs @@ -82,7 +82,7 @@ namespace osu.Game.Rulesets.Taiko.UI if (strong && hitType == HitType.Rim) flushRimTriggerSources(); - triggerSource.Play(hitType); + triggerSource.Play(hitType, strong); lastHitTime = Time.Current; lastAction = e.Action; diff --git a/osu.Game.Rulesets.Taiko/UI/DrumSampleTriggerSource.cs b/osu.Game.Rulesets.Taiko/UI/DrumSampleTriggerSource.cs index a205d4fee1..c87f95430f 100644 --- a/osu.Game.Rulesets.Taiko/UI/DrumSampleTriggerSource.cs +++ b/osu.Game.Rulesets.Taiko/UI/DrumSampleTriggerSource.cs @@ -33,7 +33,7 @@ namespace osu.Game.Rulesets.Taiko.UI } } - public virtual void Play(HitType hitType) + public virtual void Play(HitType hitType, bool strong) { TaikoHitObject? hitObject = GetMostValidObject() as TaikoHitObject; @@ -43,7 +43,7 @@ namespace osu.Game.Rulesets.Taiko.UI var baseSample = hitObject.CreateHitSampleInfo(hitType == HitType.Rim ? HitSampleInfo.HIT_CLAP : HitSampleInfo.HIT_NORMAL); // TODO: should we only play strong samples if the user correctly hits them? arguable. - if ((hitObject as TaikoStrongableHitObject)?.IsStrong == true || hitObject is StrongNestedHitObject) + if (strong) { PlaySamples(new ISampleInfo[] {