diff --git a/osu.Game/Screens/Play/GameplayClockContainer.cs b/osu.Game/Screens/Play/GameplayClockContainer.cs index d8e6fda87e..6d863f0094 100644 --- a/osu.Game/Screens/Play/GameplayClockContainer.cs +++ b/osu.Game/Screens/Play/GameplayClockContainer.cs @@ -77,8 +77,18 @@ namespace osu.Game.Screens.Play Start(); } + protected override void Update() + { + if (!IsPaused.Value) + ClockToProcess.ProcessFrame(); + + base.Update(); + } + protected abstract void OnIsPausedChanged(ValueChangedEvent isPaused); - protected abstract GameplayClock CreateGameplayClock(IClock source); + protected virtual IFrameBasedClock ClockToProcess => AdjustableClock; + + protected abstract GameplayClock CreateGameplayClock(IFrameBasedClock source); } } diff --git a/osu.Game/Screens/Play/MasterGameplayClockContainer.cs b/osu.Game/Screens/Play/MasterGameplayClockContainer.cs index efc8ca732e..83e21f3c1d 100644 --- a/osu.Game/Screens/Play/MasterGameplayClockContainer.cs +++ b/osu.Game/Screens/Play/MasterGameplayClockContainer.cs @@ -128,7 +128,9 @@ namespace osu.Game.Screens.Play Seek(skipTarget); } - protected override GameplayClock CreateGameplayClock(IClock source) + protected override IFrameBasedClock ClockToProcess => userOffsetClock; + + protected override GameplayClock CreateGameplayClock(IFrameBasedClock source) { // Lazer's audio timings in general doesn't match stable. This is the result of user testing, albeit limited. // This only seems to be required on windows. We need to eventually figure out why, with a bit of luck. @@ -140,14 +142,6 @@ namespace osu.Game.Screens.Play return localGameplayClock = new LocalGameplayClock(userOffsetClock); } - protected override void Update() - { - if (!IsPaused.Value) - userOffsetClock.ProcessFrame(); - - base.Update(); - } - /// /// Changes the backing clock to avoid using the originally provided track. ///