1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-27 21:57:19 +08:00
osu-lazer/osu.Game.Rulesets.Taiko
Bartłomiej Dach 9915fac2c8
Fix sample silence being one level too low
4a7b011a53773d547b60401f609d7e394482a3ab 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.
2023-05-21 18:58:26 +02:00
..
2022-06-17 16:37:17 +09:00
2022-07-02 19:48:32 +08:00
2023-02-09 23:23:58 +01:00
2022-11-27 00:00:27 +09:00
2022-11-27 00:00:27 +09:00