fixed "serverstatemanager.instance is null"

This commit is contained in:
Mister_Nebula 2021-11-27 11:34:26 +00:00
parent 59e001d38d
commit 8c0e177296

View File

@ -1,4 +1,5 @@
using QSB.Player; using QSB.Player;
using QSB.Player.TransformSync;
using System; using System;
namespace QSB.Utility.VariableSync namespace QSB.Utility.VariableSync
@ -18,7 +19,7 @@ namespace QSB.Utility.VariableSync
} }
else else
{ {
if (QSBPlayerManager.LocalPlayer.IsReady) if (PlayerTransformSync.LocalInstance != null && QSBPlayerManager.LocalPlayer.IsReady)
{ {
DebugLog.ToConsole($"Warning - Getter is null!", OWML.Common.MessageType.Warning); DebugLog.ToConsole($"Warning - Getter is null!", OWML.Common.MessageType.Warning);
} }
@ -34,7 +35,7 @@ namespace QSB.Utility.VariableSync
} }
else else
{ {
if (QSBPlayerManager.LocalPlayer.IsReady) if (PlayerTransformSync.LocalInstance != null && QSBPlayerManager.LocalPlayer.IsReady)
{ {
DebugLog.ToConsole($"Warning - Setter is null!", OWML.Common.MessageType.Warning); DebugLog.ToConsole($"Warning - Setter is null!", OWML.Common.MessageType.Warning);
} }