mirror of
https://github.com/ppy/osu
synced 2025-01-01 20:02:14 +00:00
Fix sample silence being one level too low
4a7b011a53
inadvertently unearthed that
nested strong hits could play samples of their own accord, rather than
delegating to `DrumSampleTriggerSource` as they were supposed to. This
was an unfortunate omission due to how the inheritance structure of
`TaikoHitObject` looks like (some irrelevant classes omitted for
brevity):
DrawableTaikoHitObject
DrawableTaikoHitObject<TObject> <-- `GetSamples()` was overridden to empty here
DrawableTaikoStrongableHitObject
DrawableHit
DrawableDrumRoll
DrawableDrumRollTick
DrawableSwell
DrawableSwellTick
DrawableStrongNestedHit <-- all strong nested hits are here => didn't receive `GetSamples()` override
DrawableHit.StrongNestedHit
DrawableDrumRoll.StrongNestedHit
DrawableDrumRollTick.StrongNestedHit
To fix, move the `GetSamples()` override one level higher, to the
non-generic `DrawableTaikoHitObject`, to suppress the spurious sample
playbacks.
The stale reference in the comment was also updated to match current
code.
This commit is contained in:
parent
4a7b011a53
commit
9915fac2c8
@ -118,6 +118,9 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
{
|
||||
public override bool RemoveWhenNotAlive => false;
|
||||
}
|
||||
|
||||
// Most osu!taiko hitsounds are managed by the drum (see DrumSampleTriggerSource).
|
||||
public override IEnumerable<HitSampleInfo> GetSamples() => Enumerable.Empty<HitSampleInfo>();
|
||||
}
|
||||
|
||||
public abstract partial class DrawableTaikoHitObject<TObject> : DrawableTaikoHitObject
|
||||
@ -157,9 +160,6 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
Content.Add(MainPiece = CreateMainPiece());
|
||||
}
|
||||
|
||||
// Most osu!taiko hitsounds are managed by the drum (see DrumSampleMapping).
|
||||
public override IEnumerable<HitSampleInfo> GetSamples() => Enumerable.Empty<HitSampleInfo>();
|
||||
|
||||
protected abstract SkinnableDrawable CreateMainPiece();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user