Skip to content

Commit

Permalink
Added UICommunicatorIndicatorOnLateUpdate_Prefix
Browse files Browse the repository at this point in the history
Fixes Headless server throwing a small error during boot sequence due to the UI being disabled.
  • Loading branch information
AlienXAXS committed Jul 4, 2024
1 parent eb3292b commit d3bf490
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions NebulaPatcher/Patches/Dynamic/Dedicated_Server_Patch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,14 @@ public static bool DoMeshGeneration_Prefix()
return false;
}

// Fixes a UI Object reference not set error during headless load due to there being no UI enabled.
[HarmonyPrefix]
[HarmonyPatch(typeof(UICommunicatorIndicator), nameof(UICommunicatorIndicator._OnLateUpdate))]
public static bool UICommunicatorIndicatorOnLateUpdate_Prefix()
{
return false;
}

[HarmonyPostfix]
[HarmonyPatch(typeof(PlanetATField), nameof(PlanetATField.RecalculatePhysicsShape))]
public static void RecalculatePhysicsShape_Postfix(PlanetATField __instance)
Expand Down

0 comments on commit d3bf490

Please sign in to comment.