mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-03 17:38:30 +00:00
defer time sync disable
This commit is contained in:
parent
3b3ea16257
commit
a703463394
@ -29,8 +29,7 @@ namespace QSB.EyeOfTheUniverse.EyeStateSync.Messages
|
||||
|
||||
if (Value >= EyeState.ForestIsDark)
|
||||
{
|
||||
WakeUpSync.LocalInstance.ResetTimeScale();
|
||||
WakeUpSync.LocalInstance.enabled = false;
|
||||
WakeUpSync.LocalInstance.EyeDisable = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,8 +40,7 @@ namespace QSB.EyeOfTheUniverse.EyeStateSync.Messages
|
||||
|
||||
if (Value >= EyeState.ForestIsDark)
|
||||
{
|
||||
WakeUpSync.LocalInstance.ResetTimeScale();
|
||||
WakeUpSync.LocalInstance.enabled = false;
|
||||
WakeUpSync.LocalInstance.EyeDisable = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,8 @@ namespace QSB.TimeSync
|
||||
private int _serverLoopCount;
|
||||
private bool _hasWokenUp;
|
||||
|
||||
public bool EyeDisable;
|
||||
|
||||
public override void OnStartLocalPlayer() => LocalInstance = this;
|
||||
|
||||
public void OnDisconnect()
|
||||
@ -215,7 +217,7 @@ namespace QSB.TimeSync
|
||||
TimeSyncUI.Start(TimeSyncType.Pausing, reason);
|
||||
}
|
||||
|
||||
public void ResetTimeScale()
|
||||
private void ResetTimeScale()
|
||||
{
|
||||
OWTime.SetTimeScale(1f);
|
||||
OWTime.SetMaxDeltaTime(0.06666667f);
|
||||
@ -252,6 +254,12 @@ namespace QSB.TimeSync
|
||||
{
|
||||
UpdateClient();
|
||||
}
|
||||
|
||||
if (EyeDisable)
|
||||
{
|
||||
ResetTimeScale();
|
||||
enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateServer()
|
||||
|
Loading…
Reference in New Issue
Block a user