From d1b9c31eca89520192500d54e969df4264155c49 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Tue, 18 Jan 2022 02:00:50 -0800 Subject: [PATCH] ugh --- QSB/Player/QSBPlayerManager.cs | 2 +- QSB/QSBCore.cs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/QSB/Player/QSBPlayerManager.cs b/QSB/Player/QSBPlayerManager.cs index e1704c1d..d62b8e47 100644 --- a/QSB/Player/QSBPlayerManager.cs +++ b/QSB/Player/QSBPlayerManager.cs @@ -27,7 +27,7 @@ namespace QSB.Player return localInstance.Player; } } - public static uint LocalPlayerId => LocalPlayer.PlayerId; + public static uint LocalPlayerId => LocalPlayer?.PlayerId ?? uint.MaxValue; /// /// called right after player is added diff --git a/QSB/QSBCore.cs b/QSB/QSBCore.cs index c5475462..d70aaffa 100644 --- a/QSB/QSBCore.cs +++ b/QSB/QSBCore.cs @@ -113,11 +113,9 @@ namespace QSB // WorldObject managers QSBWorldSync.Managers = typeof(WorldObjectManager).GetDerivedTypes() - .Select(x => (WorldObjectManager)this.gameObject.AddComponent(x)) + .Select(x => (WorldObjectManager)gameObject.AddComponent(x)) .ToArray(); - Helper.HarmonyHelper.EmptyMethod("Update"); - QSBPatchManager.OnPatchType += OnPatchType; QSBPatchManager.OnUnpatchType += OnUnpatchType; }