mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 05:53:10 +08:00
Ensure PlayerInputManager's initial time is transferred at load.
This commit is contained in:
parent
4ab636cbb8
commit
59a3e23879
@ -13,7 +13,7 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
public class PlayerInputManager : PassThroughInputManager
|
public class PlayerInputManager : PassThroughInputManager
|
||||||
{
|
{
|
||||||
private readonly ManualClock clock = new ManualClock();
|
private ManualClock clock;
|
||||||
private IFrameBasedClock parentClock;
|
private IFrameBasedClock parentClock;
|
||||||
|
|
||||||
private ReplayInputHandler replayInputHandler;
|
private ReplayInputHandler replayInputHandler;
|
||||||
@ -47,8 +47,14 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
|
//our clock will now be our parent's clock, but we want to replace this to allow manual control.
|
||||||
parentClock = Clock;
|
parentClock = Clock;
|
||||||
Clock = new FramedClock(clock);
|
|
||||||
|
Clock = new FramedClock(clock = new ManualClock
|
||||||
|
{
|
||||||
|
CurrentTime = parentClock.CurrentTime,
|
||||||
|
Rate = parentClock.Rate,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user