Skip to content

Commit

Permalink
Fix standalone server issues and crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
Extremelyd1 committed Jul 18, 2024
1 parent 6491176 commit 33be489
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions HKMP/Game/Client/Entity/Action/EntityFsmActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ private static void EmitRandomInterceptInstructions<TValue, TObject>(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<TObject, GameObject>(instance, "gameObject");
if (gameObject != null && IsObjectInRegistry(gameObject)) {
var fsmGameObject = ReflectionHelper.GetField<TObject, FsmGameObject>(instance, "gameObject");
if (fsmGameObject != null && fsmGameObject.Value != null && IsObjectInRegistry(fsmGameObject.Value)) {
return value;
}

Expand Down
2 changes: 0 additions & 2 deletions HKMP/Game/Client/Save/SaveDataMapping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Hkmp.Collection;
using Hkmp.Logging;
using Hkmp.Util;
using JetBrains.Annotations;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

Expand Down Expand Up @@ -179,7 +178,6 @@ public void Initialize() {
/// <summary>
/// Properties that denote when to sync values.
/// </summary>
[UsedImplicitly]
internal class SyncProperties {
/// <summary>
/// Whether to sync this value. If true, the variable <seealso cref="SyncType"/> indicates where to store
Expand Down

0 comments on commit 33be489

Please sign in to comment.