mirror of
https://github.com/ppy/osu
synced 2024-12-26 08:53:10 +00:00
Use WaitingOnFrames instead
This commit is contained in:
parent
98d69c846c
commit
b3e5642dfd
@ -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();
|
||||
@ -83,18 +97,6 @@ namespace osu.Game.Screens.Play
|
||||
SetGameplayStartTime(score.Replay.Frames[0].Time);
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
if (HUDOverlay.PlayerSettingsOverlay.PlaybackSettings.UserPlaybackRate.Value > 1
|
||||
&& score.Replay.Frames.Count > 0
|
||||
&& DrawableRuleset.FrameStableClock.CurrentTime >= score.Replay.Frames[^1].Time)
|
||||
{
|
||||
HUDOverlay.PlayerSettingsOverlay.PlaybackSettings.UserPlaybackRate.Value = 1;
|
||||
}
|
||||
}
|
||||
|
||||
protected override Score CreateScore(IBeatmap beatmap) => score;
|
||||
|
||||
protected override ResultsScreen CreateResults(ScoreInfo score)
|
||||
|
Loading…
Reference in New Issue
Block a user