public void OnDisconnect() { OWTime.SetTimeScale(1f); OWTime.SetMaxDeltaTime(0.06666667f); OWTime.SetFixedTimestep(0.01666667f); Locator.GetActiveCamera().enabled = true; CurrentState = State.NotLoaded; CurrentReason = null; Physics.SyncTransforms(); SpinnerUI.Hide(); TimeSyncUI.Stop(); QSBInputManager.Instance.SetInputsEnabled(true); }
private void ResetTimeScale() { OWTime.SetTimeScale(1f); OWTime.SetMaxDeltaTime(0.06666667f); OWTime.SetFixedTimestep(0.01666667f); Locator.GetActiveCamera().enabled = true; _state = State.Loaded; DebugLog.DebugWrite($"RESET TIMESCALE", MessageType.Info); _isFirstFastForward = false; QSBCore.HasWokenUp = true; Physics.SyncTransforms(); SpinnerUI.Hide(); TimeSyncUI.Stop(); QSBEventManager.FireEvent(EventNames.QSBPlayerStatesRequest); RespawnOnDeath.Instance.Init(); }
private void StartFastForwarding() { if (_state == State.FastForwarding) { TimeSyncUI.TargetTime = _serverTime; return; } DebugLog.DebugWrite($"START FASTFORWARD (Target:{_serverTime} Current:{Time.timeSinceLevelLoad})", MessageType.Info); if (Locator.GetActiveCamera() != null) { Locator.GetActiveCamera().enabled = false; } _state = State.FastForwarding; OWTime.SetMaxDeltaTime(0.033333335f); OWTime.SetFixedTimestep(0.033333335f); TimeSyncUI.TargetTime = _serverTime; TimeSyncUI.Start(TimeSyncType.Fastforwarding); }
private void ResetTimeScale() { OWTime.SetTimeScale(1f); OWTime.SetMaxDeltaTime(0.06666667f); OWTime.SetFixedTimestep(0.01666667f); Locator.GetActiveCamera().enabled = true; CurrentState = State.Loaded; CurrentReason = null; DebugLog.DebugWrite($"RESET TIMESCALE", MessageType.Info); Physics.SyncTransforms(); SpinnerUI.Hide(); TimeSyncUI.Stop(); new RequestStateResyncMessage().Send(); RespawnOnDeath.Instance.Init(); QSBInputManager.Instance.SetInputsEnabled(true); if (!_hasWokenUp) { WakeUp(); } }
private void StartFastForwarding(FastForwardReason reason) { if (CurrentState == State.FastForwarding) { TimeSyncUI.TargetTime = _serverTime; return; } DebugLog.DebugWrite($"START FASTFORWARD (Target:{_serverTime} Current:{Time.timeSinceLevelLoad})", MessageType.Info); if (Locator.GetActiveCamera() != null) { Locator.GetActiveCamera().enabled = false; } //OWInput.ChangeInputMode(InputMode.None); QSBInputManager.Instance.SetInputsEnabled(false); CurrentState = State.FastForwarding; CurrentReason = reason; OWTime.SetMaxDeltaTime(0.033333335f); OWTime.SetFixedTimestep(0.033333335f); TimeSyncUI.TargetTime = _serverTime; TimeSyncUI.Start(TimeSyncType.FastForwarding, reason); }