diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinner.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinner.cs index c092b4dd4b..2799ba4a25 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinner.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinner.cs @@ -275,6 +275,19 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables if (spinningSample != null && spinnerFrequencyModulate) spinningSample.Frequency.Value = spinning_sample_modulated_base_frequency + Progress; + + // Ticks can theoretically be judged at any point in the spinner's duration. + // For performance reasons, we only want to keep the next tick alive. + var next = NestedHitObjects.FirstOrDefault(h => !h.Judged); + + // See default `LifetimeStart` as set in `DrawableSpinnerTick`. + if (next?.LifetimeStart == double.MaxValue) + { + // the tick can be theoretically judged at any point in the spinner's duration, + // so it must be alive throughout the spinner's entire lifetime. + // this mostly matters for correct sample playback. + next.LifetimeStart = HitObject.StartTime; + } } protected override void UpdateAfterChildren() diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinnerTick.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinnerTick.cs index a5785dd1f6..5b55533edd 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinnerTick.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinnerTick.cs @@ -11,8 +11,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables { public override bool DisplayResult => false; - protected DrawableSpinner DrawableSpinner => (DrawableSpinner)ParentHitObject; - public DrawableSpinnerTick() : this(null) { @@ -29,10 +27,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables { base.OnApply(); - // the tick can be theoretically judged at any point in the spinner's duration, - // so it must be alive throughout the spinner's entire lifetime. - // this mostly matters for correct sample playback. - LifetimeStart = DrawableSpinner.HitObject.StartTime; + // Lifetime will be managed by `DrawableSpinner`. + LifetimeStart = double.MaxValue; } ///