diff --git a/QSB/TimeSync/TimeSyncUI.cs b/QSB/TimeSync/TimeSyncUI.cs index c85b0ae0..548fbed0 100644 --- a/QSB/TimeSync/TimeSyncUI.cs +++ b/QSB/TimeSync/TimeSyncUI.cs @@ -9,6 +9,8 @@ namespace QSB.TimeSync { public static TimeSyncUI Instance; + public static float TargetTime; + private Canvas _canvas; private Text _text; private float _startTime; @@ -70,7 +72,7 @@ namespace QSB.TimeSync { return; } - var totalSeconds = Mathf.Max(Time.timeSinceLevelLoad - _startTime, 0f); + var totalSeconds = Mathf.Max(TargetTime - Time.timeSinceLevelLoad, 0f); var minutes = Mathf.FloorToInt(totalSeconds / 60f); var seconds = Mathf.FloorToInt(totalSeconds) % 60; var text = ""; diff --git a/QSB/TimeSync/WakeUpSync.cs b/QSB/TimeSync/WakeUpSync.cs index f0b60033..cfbe8b69 100644 --- a/QSB/TimeSync/WakeUpSync.cs +++ b/QSB/TimeSync/WakeUpSync.cs @@ -126,10 +126,12 @@ namespace QSB.TimeSync { if (_state == State.FastForwarding) { + TimeSyncUI.TargetTime = _serverTime; return; } _timeScale = MaxFastForwardSpeed; _state = State.FastForwarding; + TimeSyncUI.TargetTime = _serverTime; TimeSyncUI.Start(TimeSyncType.Fastforwarding); }