mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-03 23:09:22 +00:00
[AASBufferFix] Fix error when animator is null
This commit is contained in:
parent
6e262bac1b
commit
d04f505d88
5 changed files with 16 additions and 9 deletions
|
@ -21,15 +21,17 @@ internal class HarmonyPatches
|
|||
private static void Postfix_PuppetMaster_AvatarInstantiated(ref PuppetMaster __instance, ref Animator ____animator)
|
||||
{
|
||||
AASBufferHelper externalBuffer = __instance.GetComponent<AASBufferHelper>();
|
||||
if (externalBuffer != null) externalBuffer.OnAvatarInstantiated(____animator);
|
||||
}
|
||||
|
||||
externalBuffer?.OnAvatarInstantiated(____animator);
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(PuppetMaster), "AvatarDestroyed")]
|
||||
private static void Postfix_PuppetMaster_AvatarDestroyed(ref PuppetMaster __instance)
|
||||
{
|
||||
AASBufferHelper externalBuffer = __instance.GetComponent<AASBufferHelper>();
|
||||
if (externalBuffer != null) externalBuffer.OnAvatarDestroyed();
|
||||
|
||||
externalBuffer?.OnAvatarDestroyed();
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue