mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-26 18:35:34 +00:00
ShipDamageController_OnImpact NRE for real
This commit is contained in:
parent
a272050b8b
commit
589750649f
@ -206,7 +206,14 @@ namespace QSB.ShipSync.Patches
|
|||||||
[HarmonyPrefix]
|
[HarmonyPrefix]
|
||||||
[HarmonyPatch(typeof(ShipDamageController), nameof(ShipDamageController.OnImpact))]
|
[HarmonyPatch(typeof(ShipDamageController), nameof(ShipDamageController.OnImpact))]
|
||||||
public static bool ShipDamageController_OnImpact()
|
public static bool ShipDamageController_OnImpact()
|
||||||
=> ShipManager.Instance && ShipManager.Instance.HasAuthority;
|
{
|
||||||
|
if (!ShipManager.Instance)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ShipManager.Instance.HasAuthority;
|
||||||
|
}
|
||||||
|
|
||||||
[HarmonyPostfix]
|
[HarmonyPostfix]
|
||||||
[HarmonyPatch(typeof(ShipComponent), nameof(ShipComponent.RepairTick))]
|
[HarmonyPatch(typeof(ShipComponent), nameof(ShipComponent.RepairTick))]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user