diff --git a/QSB/MeteorSync/Patches/MeteorClientPatches.cs b/QSB/MeteorSync/Patches/MeteorClientPatches.cs index ca8359cb..93825f0f 100644 --- a/QSB/MeteorSync/Patches/MeteorClientPatches.cs +++ b/QSB/MeteorSync/Patches/MeteorClientPatches.cs @@ -1,6 +1,5 @@ using System; using HarmonyLib; -using OWML.Common; using QSB.MeteorSync.WorldObjects; using QSB.Patches; using QSB.Utility; @@ -105,6 +104,13 @@ namespace QSB.MeteorSync.Patches } + [HarmonyPrefix] + [HarmonyPatch(typeof(MeteorController), nameof(MeteorController.OnCollisionEnter))] + public static bool OnCollisionEnter(MeteorController __instance, + Collision collision) + => false; + + [HarmonyPrefix] [HarmonyPatch(typeof(MeteorController), nameof(MeteorController.Impact))] public static bool Impact(MeteorController __instance, diff --git a/QSB/MeteorSync/WorldObjects/QSBMeteor.cs b/QSB/MeteorSync/WorldObjects/QSBMeteor.cs index 7c732486..7d8e7df7 100644 --- a/QSB/MeteorSync/WorldObjects/QSBMeteor.cs +++ b/QSB/MeteorSync/WorldObjects/QSBMeteor.cs @@ -43,8 +43,6 @@ namespace QSB.MeteorSync.WorldObjects impactPoint = Locator._brittleHollow.transform.TransformPoint(impactPoint); Damage = damage; - AttachedObject.transform.position = impactPoint; - var hits = Physics.OverlapSphere(impactPoint, 1, OWLayerMask.physicalMask, QueryTriggerInteraction.Ignore); var obj = hits .Select(x => x.gameObject) @@ -56,6 +54,7 @@ namespace QSB.MeteorSync.WorldObjects return; } + AttachedObject.owRigidbody.MoveToPosition(impactPoint); var impactVel = AttachedObject.owRigidbody.GetVelocity() - obj.GetAttachedOWRigidbody().GetVelocity(); AttachedObject.Impact(obj, impactPoint, impactVel);