ShipDamageController_OnImpact NRE for real

This commit is contained in:
JohnCorby 2021-12-12 03:01:41 -08:00
parent a272050b8b
commit 589750649f

View File

@ -206,7 +206,14 @@ namespace QSB.ShipSync.Patches
[HarmonyPrefix]
[HarmonyPatch(typeof(ShipDamageController), nameof(ShipDamageController.OnImpact))]
public static bool ShipDamageController_OnImpact()
=> ShipManager.Instance && ShipManager.Instance.HasAuthority;
{
if (!ShipManager.Instance)
{
return true;
}
return ShipManager.Instance.HasAuthority;
}
[HarmonyPostfix]
[HarmonyPatch(typeof(ShipComponent), nameof(ShipComponent.RepairTick))]