This commit is contained in:
JohnCorby 2022-01-14 22:31:48 -08:00
parent 1a1b48cfc6
commit 24cffdbf43
3 changed files with 3 additions and 4 deletions

View File

@ -4,6 +4,7 @@ using QSB.Messaging;
using QSB.Patches; using QSB.Patches;
using QSB.Player; using QSB.Player;
using QSB.ShipSync; using QSB.ShipSync;
using QSB.ShipSync.TransformSync;
using QSB.Utility; using QSB.Utility;
using System.Linq; using System.Linq;
using UnityEngine; using UnityEngine;
@ -204,7 +205,7 @@ namespace QSB.DeathSync.Patches
return true; return true;
} }
if (!ShipManager.Instance.HasAuthority) if (!ShipTransformSync.LocalInstance.hasAuthority)
{ {
return false; return false;
} }

View File

@ -215,7 +215,7 @@ 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()
=> ShipTransformSync.LocalInstance == null || ShipManager.Instance.HasAuthority; => ShipTransformSync.LocalInstance == null || ShipTransformSync.LocalInstance.hasAuthority;
[HarmonyPostfix] [HarmonyPostfix]
[HarmonyPatch(typeof(ShipComponent), nameof(ShipComponent.RepairTick))] [HarmonyPatch(typeof(ShipComponent), nameof(ShipComponent.RepairTick))]

View File

@ -22,8 +22,6 @@ namespace QSB.ShipSync
public ShipTractorBeamSwitch ShipTractorBeam; public ShipTractorBeamSwitch ShipTractorBeam;
public ShipCockpitController CockpitController; public ShipCockpitController CockpitController;
public ShipElectricalComponent ShipElectricalComponent; public ShipElectricalComponent ShipElectricalComponent;
public bool HasAuthority
=> ShipTransformSync.LocalInstance.hasAuthority;
public uint CurrentFlyer public uint CurrentFlyer
{ {
get => _currentFlyer; get => _currentFlyer;