From b391a8f94e23b66a82825fc180a8fd10db0ffba3 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Thu, 15 Apr 2021 19:37:45 +0900 Subject: [PATCH] Properly bind WaitingOnFrames --- .../Spectate/MultiplayerSpectatorPlayer.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/MultiplayerSpectatorPlayer.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/MultiplayerSpectatorPlayer.cs index 1a7e0dd36a..19cc9f18ad 100644 --- a/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/MultiplayerSpectatorPlayer.cs +++ b/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/MultiplayerSpectatorPlayer.cs @@ -1,6 +1,7 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Timing; using osu.Game.Beatmaps; @@ -12,14 +13,20 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate { public class MultiplayerSpectatorPlayer : SpectatorPlayer { - private readonly SpectatorCatchUpSlaveClock gameplayClock; + private readonly ISpectatorSlaveClock gameplayClock; - public MultiplayerSpectatorPlayer(Score score, SpectatorCatchUpSlaveClock gameplayClock) + public MultiplayerSpectatorPlayer(Score score, ISpectatorSlaveClock gameplayClock) : base(score) { this.gameplayClock = gameplayClock; } + [BackgroundDependencyLoader] + private void load() + { + gameplayClock.WaitingOnFrames.BindTo(DrawableRuleset.FrameStableClock.WaitingOnFrames); + } + protected override GameplayClockContainer CreateGameplayClockContainer(WorkingBeatmap beatmap, double gameplayStart) => new SubGameplayClockContainer(gameplayClock); }