This commit is contained in:
JohnCorby 2022-01-11 21:16:34 -08:00
parent a349e4dd2b
commit f5d98f9de1
2 changed files with 5 additions and 8 deletions

View File

@ -28,17 +28,14 @@ namespace QSB.QuantumSync.Patches
return false;
}
[HarmonyPrefix]
[HarmonyPostfix]
[HarmonyPatch(typeof(QuantumObject), nameof(QuantumObject.SetIsQuantum))]
public static bool QuantumObject_SetIsQuantum(QuantumObject __instance)
public static void QuantumObject_SetIsQuantum(QuantumObject __instance)
{
if (!WorldObjectManager.AllObjectsReady)
if (WorldObjectManager.AllObjectsReady)
{
return true;
__instance.GetWorldObject<IQSBQuantumObject>().SendMessage(new SetIsQuantumMessage(__instance.IsQuantum()));
}
__instance.GetWorldObject<IQSBQuantumObject>().SendMessage(new SetIsQuantumMessage(__instance.IsQuantum()));
return false;
}
[HarmonyPrefix]

View File

@ -165,7 +165,7 @@ namespace QSB.QuantumSync.WorldObjects
return totalShapes;
}
public void SetIsQuantum(bool isQuantum) => AttachedObject.SetIsQuantum(isQuantum);
public void SetIsQuantum(bool isQuantum) => AttachedObject._isQuantum = isQuantum;
private void OnEnable(Shape s)
{