Skip to content

Commit

Permalink
Merge pull request #25216 from bdach/spinner-tick-lifetime
Browse files Browse the repository at this point in the history
Fix spinner ticks not playing samples correctly sometimes
  • Loading branch information
peppy authored Oct 24, 2023
2 parents 19be005 + 68397f0 commit bf313cc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinnerTick.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ public DrawableSpinnerTick(SpinnerTick spinnerTick)
Origin = Anchor.Centre;
}

protected override void OnApply()
{
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;
}

/// <summary>
/// Apply a judgement result.
/// </summary>
Expand Down

0 comments on commit bf313cc

Please sign in to comment.