diff --git a/HKMP/Game/Client/Entity/Action/EntityFsmActions.cs b/HKMP/Game/Client/Entity/Action/EntityFsmActions.cs index f68493e..13c2365 100644 --- a/HKMP/Game/Client/Entity/Action/EntityFsmActions.cs +++ b/HKMP/Game/Client/Entity/Action/EntityFsmActions.cs @@ -215,8 +215,8 @@ private static void EmitRandomInterceptInstructions(ILCursor c) // We need to check whether the game object that is being spawned with this action is not an object // managed by the system. Because if so, we do not store the random values because the action for it // is not being networked. Only the game object spawn is networked with an EntitySpawn packet directly. - var gameObject = ReflectionHelper.GetField(instance, "gameObject"); - if (gameObject != null && IsObjectInRegistry(gameObject)) { + var fsmGameObject = ReflectionHelper.GetField(instance, "gameObject"); + if (fsmGameObject != null && fsmGameObject.Value != null && IsObjectInRegistry(fsmGameObject.Value)) { return value; } diff --git a/HKMP/Game/Client/Save/SaveDataMapping.cs b/HKMP/Game/Client/Save/SaveDataMapping.cs index c3222d6..cefa5fb 100644 --- a/HKMP/Game/Client/Save/SaveDataMapping.cs +++ b/HKMP/Game/Client/Save/SaveDataMapping.cs @@ -3,7 +3,6 @@ using Hkmp.Collection; using Hkmp.Logging; using Hkmp.Util; -using JetBrains.Annotations; using Newtonsoft.Json; using Newtonsoft.Json.Converters; @@ -179,7 +178,6 @@ public void Initialize() { /// /// Properties that denote when to sync values. /// - [UsedImplicitly] internal class SyncProperties { /// /// Whether to sync this value. If true, the variable indicates where to store