1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-05 04:52:53 +08:00

Change strong hit sample handling to be user input based, not hit object based

This commit is contained in:
Dean Herbert 2023-06-30 17:50:32 +09:00
parent a9587fd1aa
commit 010262c764
3 changed files with 6 additions and 7 deletions

View File

@ -27,7 +27,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Argon
// TODO: pool flourish sample // TODO: pool flourish sample
} }
public override void Play(HitType hitType) public override void Play(HitType hitType, bool strong)
{ {
TaikoHitObject? hitObject = GetMostValidObject() as TaikoHitObject; 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 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) if (skinSource.FindProvider(s => s.GetSample(baseSample) != null) is LegacySkin)
{ {
base.Play(hitType); base.Play(hitType, strong);
return; return;
} }
// let the magic begin... // let the magic begin...
// TODO: should we only play strong samples if the user correctly hits them? arguable. if (strong)
if ((hitObject as TaikoStrongableHitObject)?.IsStrong == true || hitObject is StrongNestedHitObject)
{ {
PlaySamples(new ISampleInfo[] PlaySamples(new ISampleInfo[]
{ {

View File

@ -82,7 +82,7 @@ namespace osu.Game.Rulesets.Taiko.UI
if (strong && hitType == HitType.Rim) if (strong && hitType == HitType.Rim)
flushRimTriggerSources(); flushRimTriggerSources();
triggerSource.Play(hitType); triggerSource.Play(hitType, strong);
lastHitTime = Time.Current; lastHitTime = Time.Current;
lastAction = e.Action; lastAction = e.Action;

View File

@ -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; 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); 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. // 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[] PlaySamples(new ISampleInfo[]
{ {