mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-30 03:32:47 +00:00
fix it better by removing it entirely
This commit is contained in:
parent
a203d2d0ef
commit
d40eff9dcf
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user