Basically same

This commit is contained in:
SDraw 2022-11-03 01:58:45 +03:00
parent 4e43b562c9
commit 8ef25664df
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
7 changed files with 22 additions and 22 deletions

View file

@ -22,9 +22,9 @@ namespace ml_amt
new HarmonyLib.HarmonyMethod(typeof(AvatarMotionTweaker).GetMethod(nameof(OnAvatarClear_Postfix), BindingFlags.NonPublic | BindingFlags.Static))
);
HarmonyInstance.Patch(
typeof(PlayerSetup).GetMethod(nameof(PlayerSetup.CalibrateAvatar)),
typeof(PlayerSetup).GetMethod(nameof(PlayerSetup.SetupAvatar)),
null,
new HarmonyLib.HarmonyMethod(typeof(AvatarMotionTweaker).GetMethod(nameof(OnCalibrateAvatar_Postfix), BindingFlags.Static | BindingFlags.NonPublic))
new HarmonyLib.HarmonyMethod(typeof(AvatarMotionTweaker).GetMethod(nameof(OnSetupAvatar_Postfix), BindingFlags.Static | BindingFlags.NonPublic))
);
MelonLoader.MelonCoroutines.Start(WaitForLocalPlayer());
@ -69,13 +69,13 @@ namespace ml_amt
}
}
static void OnCalibrateAvatar_Postfix() => ms_instance?.OnCalibrateAvatar();
void OnCalibrateAvatar()
static void OnSetupAvatar_Postfix() => ms_instance?.OnSetupAvatar();
void OnSetupAvatar()
{
try
{
if(m_localTweaker != null)
m_localTweaker.OnCalibrateAvatar();
m_localTweaker.OnSetupAvatar();
}
catch(System.Exception l_exception)
{

View file

@ -220,7 +220,7 @@ namespace ml_amt
m_parameters.Clear();
}
public void OnCalibrateAvatar()
public void OnSetupAvatar()
{
m_vrIk = PlayerSetup.Instance._avatar.GetComponent<VRIK>();
m_locomotionLayer = PlayerSetup.Instance._animator.GetLayerIndex("Locomotion/Emotes");