mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Fix beat sync stopping after returning to menu from a failed play
Closes #20193. Explanation is inline comment.
This commit is contained in:
@ -121,6 +121,17 @@ namespace osu.Game.Beatmaps
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
if (Source != null && Source is not IAdjustableClock && Source.CurrentTime < finalClockSource.CurrentTime)
|
||||
{
|
||||
// InterpolatingFramedClock won't interpolate backwards unless its source has an ElapsedFrameTime.
|
||||
// See https://github.com/ppy/osu-framework/blob/ba1385330cc501f34937e08257e586c84e35d772/osu.Framework/Timing/InterpolatingFramedClock.cs#L91-L93
|
||||
// This is not always the case here when doing large seeks.
|
||||
// (Of note, this is not an issue if the source is adjustable, as the source is seeked to be in time by DecoupleableInterpolatingFramedClock).
|
||||
// Rather than trying to get around this by fixing the framework clock stack, let's work around it for now.
|
||||
Seek(Source.CurrentTime);
|
||||
}
|
||||
|
||||
finalClockSource.ProcessFrame();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user