mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-03-10 16:14:45 +00:00
fix WakeUpSync stuff
This commit is contained in:
parent
5de1c5c07a
commit
0b039ce792
@ -33,5 +33,5 @@ public class ServerTimeMessage : QSBMessage
|
||||
}
|
||||
|
||||
public override void OnReceiveRemote()
|
||||
=> WakeUpSync.LocalInstance.OnClientReceiveMessage(ServerTime, LoopCount, SecondsRemaining);
|
||||
=> WakeUpSync.LocalInstance?.OnClientReceiveMessage(ServerTime, LoopCount, SecondsRemaining);
|
||||
}
|
||||
|
@ -54,8 +54,6 @@ public class WakeUpSync : MonoBehaviour, IAddComponentOnStart
|
||||
|
||||
public void Start()
|
||||
{
|
||||
LocalInstance = this;
|
||||
|
||||
if (QSBSceneManager.IsInUniverse)
|
||||
{
|
||||
Init();
|
||||
@ -99,10 +97,12 @@ public class WakeUpSync : MonoBehaviour, IAddComponentOnStart
|
||||
_hasWokenUp = true;
|
||||
}
|
||||
|
||||
LocalInstance = this;
|
||||
Init();
|
||||
}
|
||||
else
|
||||
{
|
||||
LocalInstance = null;
|
||||
CurrentState = State.NotLoaded;
|
||||
}
|
||||
}
|
||||
@ -263,7 +263,7 @@ public class WakeUpSync : MonoBehaviour, IAddComponentOnStart
|
||||
{
|
||||
UpdateServer();
|
||||
}
|
||||
else if (!QSBCore.DebugSettings.AvoidTimeSync)
|
||||
else if (NetworkClient.active && QSBSceneManager.IsInUniverse && !QSBCore.DebugSettings.AvoidTimeSync)
|
||||
{
|
||||
UpdateClient();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user