impact debug logging

This commit is contained in:
JohnCorby 2021-11-13 22:01:04 -08:00
parent 9bbc5f7328
commit 6f1493eefa
2 changed files with 13 additions and 0 deletions

View File

@ -101,6 +101,9 @@ namespace QSB.MeteorSync.Patches
__instance._hasImpacted = true;
__instance._impactTime = Time.time;
var qsbMeteor = QSBWorldSync.GetWorldFromUnity<QSBMeteor>(__instance);
DebugLog.DebugWrite($"{qsbMeteor.LogName} - impact {hitObject.name} {impactPoint} {impactVel}");
return false;
}
}

View File

@ -139,6 +139,16 @@ namespace QSB.MeteorSync.Patches
}
[HarmonyPostfix]
[HarmonyPatch(typeof(MeteorController), nameof(MeteorController.Impact))]
public static void Impact(MeteorController __instance,
GameObject hitObject, Vector3 impactPoint, Vector3 impactVel)
{
var qsbMeteor = QSBWorldSync.GetWorldFromUnity<QSBMeteor>(__instance);
DebugLog.DebugWrite($"{qsbMeteor.LogName} - impact {hitObject.name} {impactPoint} {impactVel}");
}
[HarmonyPostfix]
[HarmonyPatch(typeof(FragmentIntegrity), nameof(FragmentIntegrity.AddDamage))]
public static void AddDamage(FragmentIntegrity __instance,