[AASBufferFix] Cleanup

This commit is contained in:
NotAKidoS 2023-06-30 19:52:25 -05:00
parent 37875a2c7c
commit c7ca08cd4d
3 changed files with 8 additions and 5 deletions

View file

@ -33,7 +33,7 @@ public class AASBufferHelper : MonoBehaviour
GameHandlesAAS = true;
return;
}
//check if avatar uses Avatar Advanced Settings
///SendDebug("[OnInit] Remote avatar initialized. Checking for AAS...");
CVRAvatar avatar = animator.GetComponent<CVRAvatar>();

View file

@ -24,7 +24,7 @@ internal class HarmonyPatches
externalBuffer?.OnAvatarInstantiated(____animator);
}
[HarmonyPostfix]
[HarmonyPatch(typeof(PuppetMaster), "AvatarDestroyed")]
private static void Postfix_PuppetMaster_AvatarDestroyed(ref PuppetMaster __instance)

View file

@ -1,5 +1,4 @@
using MelonLoader;
using UnityEngine;
using UnityEngine;
namespace NAK.AASBufferFix;
@ -14,7 +13,11 @@ public class Utils
foreach (AnimatorControllerParameter animatorControllerParameter in animator.parameters)
{
if (animatorControllerParameter.name.Length > 0 && animatorControllerParameter.name[0] != '#' && !coreParameters.Contains(animatorControllerParameter.name) && bitCount <= 3200)
// Do not count above bit limit
if (!(bitCount <= 3200))
break;
if (animatorControllerParameter.name.Length > 0 && animatorControllerParameter.name[0] != '#' && !coreParameters.Contains(animatorControllerParameter.name))
{
AnimatorControllerParameterType type = animatorControllerParameter.type;
switch (type)