Fix rewind causing weirdness with progress bar animation

This commit is contained in:
Dean Herbert 2024-09-03 18:50:57 +09:00
parent eb70a1b72d
commit 6c89c4eed6
No known key found for this signature in database

View File

@ -145,6 +145,13 @@ namespace osu.Game.Screens.Play
base.Update();
remainingTimeBox.Height = Math.Min(8, remainingTimeBox.DrawWidth);
// Keep things simple by resetting beat synced transforms on a rewind.
if (Clock.ElapsedFrameTime < 0)
{
remainingTimeBox.ClearTransforms(targetMember: nameof(Width));
remainingTimeBox.Width = remainingTimeForCurrentPeriod;
}
}
protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, ChannelAmplitudes amplitudes)