Merge pull request #18768 from smoogipoo/spectator-reset-speed-at-end

Reset spectator speed after the last frame is reached
This commit is contained in:
Dean Herbert
2022-06-21 14:41:08 +09:00
committed by GitHub

View File

@ -45,6 +45,20 @@ namespace osu.Game.Screens.Play
});
}
protected override void LoadComplete()
{
base.LoadComplete();
DrawableRuleset.FrameStableClock.WaitingOnFrames.BindValueChanged(waiting =>
{
if (GameplayClockContainer is MasterGameplayClockContainer master)
{
if (master.UserPlaybackRate.Value > 1 && waiting.NewValue)
master.UserPlaybackRate.Value = 1;
}
}, true);
}
protected override void StartGameplay()
{
base.StartGameplay();