mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
touch
This commit is contained in:
parent
7b5ad71060
commit
9cc62a961c
2 changed files with 28 additions and 29 deletions
|
@ -1,8 +1,8 @@
|
|||
using ABI.CCK.Components;
|
||||
using ABI_RC.Core.InteractionSystem;
|
||||
using ABI_RC.Core.Player;
|
||||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
using ABI_RC.Core.Player;
|
||||
|
||||
namespace NAK.Melons.BadAnimatorFix.HarmonyPatches;
|
||||
|
||||
|
@ -54,9 +54,10 @@ internal static class AnimatorPatches
|
|||
Animator[] animators = gameObject.GetComponentsInChildren<Animator>(true);
|
||||
foreach (Animator animator in animators)
|
||||
{
|
||||
if (animator.gameObject.GetComponent<BadAnimatorFix>() != null) continue;
|
||||
if (animator.runtimeAnimatorController != null)
|
||||
if (!animator.TryGetComponent<BadAnimatorFix>(out _))
|
||||
{
|
||||
animator.gameObject.AddComponent<BadAnimatorFix>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue