fix it better by removing it entirely

This commit is contained in:
Mister_Nebula 2022-11-21 21:33:29 +00:00
parent a203d2d0ef
commit d40eff9dcf
2 changed files with 0 additions and 23 deletions

View File

@ -48,8 +48,6 @@ internal class ClientTimePatches : QSBPatch
{
public override QSBPatchTypes Type => QSBPatchTypes.OnNonServerClientConnect;
public static float OverrideFixedTimestep { get; private set; }
[HarmonyPrefix]
[HarmonyPatch(typeof(TimeLoop), nameof(TimeLoop.SetSecondsRemaining))]
private static void SetSecondsRemaining(float secondsRemaining)
@ -60,22 +58,4 @@ internal class ClientTimePatches : QSBPatch
}
new SetSecondsRemainingMessage(secondsRemaining).Send();
}
[HarmonyPrefix]
[HarmonyPatch(typeof(OWTime), nameof(OWTime.InitializeTimeSettings))]
public static bool InitializeTimeSettings()
{
if (SecretSettings.TryGetInt("PhysicsRate", out var num))
{
num = Mathf.Max(num, 1);
OWTime.s_fixedTimestep = 1f / (float)num;
OverrideFixedTimestep = OWTime.s_fixedTimestep;
}
Time.fixedDeltaTime = OWTime.s_fixedTimestep;
Time.maximumDeltaTime = OWTime.s_maxDeltaTime;
Time.maximumParticleDeltaTime = OWTime.s_maxDeltaTime;
return false;
}
}

View File

@ -47,7 +47,6 @@ public class WakeUpSync : NetworkBehaviour
{
OWTime.SetTimeScale(1f);
OWTime.SetMaxDeltaTime(0.06666667f);
OWTime.SetFixedTimestep(ClientTimePatches.OverrideFixedTimestep);
Locator.GetActiveCamera().enabled = true;
CurrentState = State.NotLoaded;
CurrentReason = null;
@ -215,7 +214,6 @@ public class WakeUpSync : NetworkBehaviour
CurrentState = State.FastForwarding;
CurrentReason = reason;
OWTime.SetMaxDeltaTime(0.033333335f);
OWTime.SetFixedTimestep(0.033333335f);
TimeSyncUI.TargetTime = _serverTime;
TimeSyncUI.Start(TimeSyncType.FastForwarding, reason);
}
@ -246,7 +244,6 @@ public class WakeUpSync : NetworkBehaviour
{
OWTime.SetTimeScale(1f);
OWTime.SetMaxDeltaTime(0.06666667f);
OWTime.SetFixedTimestep(ClientTimePatches.OverrideFixedTimestep);
Locator.GetActiveCamera().enabled = true;
CurrentState = State.Loaded;
CurrentReason = null;