mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-03 23:09:22 +00:00
[BadAnimatorFix] Fixes for 2023r171
This commit is contained in:
parent
d3db894acf
commit
b20928c2b1
6 changed files with 17 additions and 40 deletions
|
@ -6,7 +6,7 @@ using UnityEngine;
|
|||
|
||||
namespace NAK.BadAnimatorFix.HarmonyPatches;
|
||||
|
||||
static class AnimatorPatches
|
||||
internal static class AnimatorPatches
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.Start))]
|
||||
|
@ -31,24 +31,6 @@ static class AnimatorPatches
|
|||
AddBadAnimatorFixComponentIfAnimatorExists(__instance.gameObject);
|
||||
}
|
||||
|
||||
// Set QM stuff
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(CVR_MenuManager), nameof(CVR_MenuManager.Start))]
|
||||
private static void Postfix_CVR_MenuManager_Start(ref CVR_MenuManager __instance)
|
||||
{
|
||||
if (!BadAnimatorFix.EntryMenus.Value) return;
|
||||
AddBadAnimatorFixComponentIfAnimatorExists(__instance.gameObject);
|
||||
}
|
||||
|
||||
// Set MM stuff
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(ViewManager), nameof(ViewManager.Start))]
|
||||
private static void Postfix_ViewManager_Start(ref ViewManager __instance)
|
||||
{
|
||||
if (!BadAnimatorFix.EntryMenus.Value) return;
|
||||
AddBadAnimatorFixComponentIfAnimatorExists(__instance.gameObject);
|
||||
}
|
||||
|
||||
private static void AddBadAnimatorFixComponentIfAnimatorExists(GameObject gameObject)
|
||||
{
|
||||
Animator[] animators = gameObject.GetComponentsInChildren<Animator>(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue