mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 22:39:22 +00:00
Move many mods to Deprecated folder, fix spelling
This commit is contained in:
parent
5e822cec8d
commit
0042590aa6
539 changed files with 7475 additions and 3120 deletions
|
@ -0,0 +1,43 @@
|
|||
using System.Reflection;
|
||||
using ABI_RC.Core.Player;
|
||||
using HarmonyLib;
|
||||
using MelonLoader;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NAK.RemoteAvatarDisablingCameraOnFirstFrameFix;
|
||||
|
||||
public class RemoteAvatarDisablingCameraOnFirstFrameFixMod : MelonMod
|
||||
{
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
HarmonyInstance.Patch(
|
||||
typeof(PuppetMaster).GetMethod(nameof(PuppetMaster.AvatarInstantiated),
|
||||
BindingFlags.Public | BindingFlags.Instance),
|
||||
postfix: new HarmonyMethod(typeof(RemoteAvatarDisablingCameraOnFirstFrameFixMod).GetMethod(nameof(OnPuppetMasterAvatarInstantiated),
|
||||
BindingFlags.NonPublic | BindingFlags.Static))
|
||||
);
|
||||
}
|
||||
|
||||
private static void OnPuppetMasterAvatarInstantiated(PuppetMaster __instance)
|
||||
{
|
||||
if (__instance._animator == null) return;
|
||||
|
||||
__instance._animator.WriteDefaultValues();
|
||||
__instance._animator.keepAnimatorStateOnDisable = false;
|
||||
__instance._animator.writeDefaultValuesOnDisable = false;
|
||||
}
|
||||
|
||||
// private static void OnPuppetMasterAvatarInstantiated(PuppetMaster __instance)
|
||||
// {
|
||||
// if (__instance._animator == null) return;
|
||||
//
|
||||
// // Set culling mode to always animate
|
||||
// __instance._animator.cullingMode = AnimatorCullingMode.AlwaysAnimate;
|
||||
//
|
||||
// // Update the animator to force it to do the first frame
|
||||
// __instance._animator.Update(0f);
|
||||
//
|
||||
// // Set culling mode back to cull update transforms
|
||||
// __instance._animator.cullingMode = AnimatorCullingMode.CullUpdateTransforms;
|
||||
// }
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue