This commit is contained in:
NotAKidoS 2023-03-24 17:17:53 -05:00
parent 83c101f5ee
commit 1acf58d161
5 changed files with 88 additions and 38 deletions

View file

@ -2,6 +2,7 @@
using ABI_RC.Core.InteractionSystem;
using HarmonyLib;
using UnityEngine;
using ABI_RC.Core.IO;
namespace NAK.Melons.BadAnimatorFix.HarmonyPatches;
@ -51,7 +52,7 @@ internal class AnimatorPatches
private static void AddBadAnimatorFixComponentIfAnimatorExists(GameObject gameObject)
{
if (!BadAnimatorFixMod.EntryEnabled.Value) return;
//if (!BadAnimatorFixMod.EntryEnabled.Value) return;
Animator[] animators = gameObject.GetComponentsInChildren<Animator>();
foreach (Animator animator in animators.Where(a => a.gameObject.GetComponent<BadAnimatorFix>() == null))
{
@ -59,5 +60,4 @@ internal class AnimatorPatches
animator.gameObject.AddComponent<BadAnimatorFix>();
}
}
}
}