remove from cache on OWRigidbody.OnDestroy

This commit is contained in:
JohnCorby 2022-01-27 16:11:30 -08:00
parent 321ca2a045
commit 65919be25f

View File

@ -145,8 +145,11 @@ namespace QSB.Utility
[HarmonyPrefix]
[HarmonyPatch(nameof(OWRigidbody.OnDestroy))]
private static void OnDestroy(OWRigidbody __instance) =>
private static void OnDestroy(OWRigidbody __instance)
{
_cache.Remove(__instance._transform);
_setParentQueue.Remove(__instance);
}
[HarmonyPrefix]
[HarmonyPatch(nameof(OWRigidbody.Suspend), typeof(Transform), typeof(OWRigidbody))]