From 59a3e23879891e7c488bb7af95a544e99ec0564f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 27 Apr 2017 17:38:00 +0900 Subject: [PATCH] Ensure PlayerInputManager's initial time is transferred at load. --- osu.Game/Screens/Play/PlayerInputManager.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Play/PlayerInputManager.cs b/osu.Game/Screens/Play/PlayerInputManager.cs index f961286818..9707ccbc35 100644 --- a/osu.Game/Screens/Play/PlayerInputManager.cs +++ b/osu.Game/Screens/Play/PlayerInputManager.cs @@ -13,7 +13,7 @@ namespace osu.Game.Screens.Play { public class PlayerInputManager : PassThroughInputManager { - private readonly ManualClock clock = new ManualClock(); + private ManualClock clock; private IFrameBasedClock parentClock; private ReplayInputHandler replayInputHandler; @@ -47,8 +47,14 @@ namespace osu.Game.Screens.Play { base.LoadComplete(); + //our clock will now be our parent's clock, but we want to replace this to allow manual control. parentClock = Clock; - Clock = new FramedClock(clock); + + Clock = new FramedClock(clock = new ManualClock + { + CurrentTime = parentClock.CurrentTime, + Rate = parentClock.Rate, + }); } ///