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

View file

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

View file

@ -102,7 +102,7 @@ namespace ml_dht
} }
} }
public void OnCalibrateAvatar() public void OnSetupAvatar()
{ {
m_avatarDescriptor = PlayerSetup.Instance._avatar.GetComponent<CVRAvatar>(); m_avatarDescriptor = PlayerSetup.Instance._avatar.GetComponent<CVRAvatar>();
m_headBone = PlayerSetup.Instance._animator.GetBoneTransform(HumanBodyBones.Head); m_headBone = PlayerSetup.Instance._animator.GetBoneTransform(HumanBodyBones.Head);

View file

@ -33,9 +33,9 @@ namespace ml_dht
new HarmonyLib.HarmonyMethod(typeof(DesktopHeadTracking).GetMethod(nameof(OnAvatarClear_Postfix), BindingFlags.Static | BindingFlags.NonPublic)) new HarmonyLib.HarmonyMethod(typeof(DesktopHeadTracking).GetMethod(nameof(OnAvatarClear_Postfix), BindingFlags.Static | BindingFlags.NonPublic))
); );
HarmonyInstance.Patch( HarmonyInstance.Patch(
typeof(PlayerSetup).GetMethod(nameof(PlayerSetup.CalibrateAvatar)), typeof(PlayerSetup).GetMethod(nameof(PlayerSetup.SetupAvatar)),
null, null,
new HarmonyLib.HarmonyMethod(typeof(DesktopHeadTracking).GetMethod(nameof(OnCalibrateAvatar_Postfix), BindingFlags.Static | BindingFlags.NonPublic)) new HarmonyLib.HarmonyMethod(typeof(DesktopHeadTracking).GetMethod(nameof(OnSetupAvatar_Postfix), BindingFlags.Static | BindingFlags.NonPublic))
); );
HarmonyInstance.Patch( HarmonyInstance.Patch(
typeof(CVREyeController).GetMethod("Update", BindingFlags.Instance | BindingFlags.NonPublic), typeof(CVREyeController).GetMethod("Update", BindingFlags.Instance | BindingFlags.NonPublic),
@ -84,13 +84,13 @@ namespace ml_dht
} }
} }
static void OnCalibrateAvatar_Postfix() => ms_instance?.OnCalibrateAvatar(); static void OnSetupAvatar_Postfix() => ms_instance?.OnSetupAvatar();
void OnCalibrateAvatar() void OnSetupAvatar()
{ {
try try
{ {
if(m_localTracked != null) if(m_localTracked != null)
m_localTracked.OnCalibrateAvatar(); m_localTracked.OnSetupAvatar();
} }
catch(System.Exception e) catch(System.Exception e)
{ {

View file

@ -44,9 +44,9 @@ namespace ml_fpt
new HarmonyLib.HarmonyMethod(typeof(FourPointTracking).GetMethod(nameof(OnAvatarClear_Postfix), BindingFlags.NonPublic | BindingFlags.Static)) new HarmonyLib.HarmonyMethod(typeof(FourPointTracking).GetMethod(nameof(OnAvatarClear_Postfix), BindingFlags.NonPublic | BindingFlags.Static))
); );
HarmonyInstance.Patch( HarmonyInstance.Patch(
typeof(PlayerSetup).GetMethod(nameof(PlayerSetup.CalibrateAvatar)), typeof(PlayerSetup).GetMethod(nameof(PlayerSetup.SetupAvatar)),
null, null,
new HarmonyLib.HarmonyMethod(typeof(FourPointTracking).GetMethod(nameof(OnCalibrateAvatar_Postfix), BindingFlags.Static | BindingFlags.NonPublic)) new HarmonyLib.HarmonyMethod(typeof(FourPointTracking).GetMethod(nameof(OnSetupAvatar_Postfix), BindingFlags.Static | BindingFlags.NonPublic))
); );
MelonLoader.MelonCoroutines.Start(WaitForMainMenuView()); MelonLoader.MelonCoroutines.Start(WaitForMainMenuView());
@ -253,8 +253,8 @@ namespace ml_fpt
} }
} }
static void OnCalibrateAvatar_Postfix() => ms_instance?.OnCalibrateAvatar(); static void OnSetupAvatar_Postfix() => ms_instance?.OnSetupAvatar();
void OnCalibrateAvatar() void OnSetupAvatar()
{ {
try try
{ {

View file

@ -211,7 +211,7 @@ namespace ml_lme
m_rightHandTarget.localRotation = Quaternion.identity; m_rightHandTarget.localRotation = Quaternion.identity;
} }
public void OnCalibrateAvatar() public void OnSetupAvatar()
{ {
m_vrIK = PlayerSetup.Instance._animator.GetComponent<VRIK>(); m_vrIK = PlayerSetup.Instance._animator.GetComponent<VRIK>();

View file

@ -53,9 +53,9 @@ namespace ml_lme
new HarmonyLib.HarmonyMethod(typeof(LeapMotionExtension).GetMethod(nameof(OnAvatarClear_Postfix), BindingFlags.Static | BindingFlags.NonPublic)) new HarmonyLib.HarmonyMethod(typeof(LeapMotionExtension).GetMethod(nameof(OnAvatarClear_Postfix), BindingFlags.Static | BindingFlags.NonPublic))
); );
HarmonyInstance.Patch( HarmonyInstance.Patch(
typeof(PlayerSetup).GetMethod(nameof(PlayerSetup.CalibrateAvatar)), typeof(PlayerSetup).GetMethod(nameof(PlayerSetup.SetupAvatar)),
null, null,
new HarmonyLib.HarmonyMethod(typeof(LeapMotionExtension).GetMethod(nameof(OnCalibrateAvatar_Postfix), BindingFlags.Static | BindingFlags.NonPublic)) new HarmonyLib.HarmonyMethod(typeof(LeapMotionExtension).GetMethod(nameof(OnSetupAvatar_Postfix), BindingFlags.Static | BindingFlags.NonPublic))
); );
@ -341,13 +341,13 @@ namespace ml_lme
} }
} }
static void OnCalibrateAvatar_Postfix() => ms_instance?.OnCalibrateAvatar(); static void OnSetupAvatar_Postfix() => ms_instance?.OnSetupAvatar();
void OnCalibrateAvatar() void OnSetupAvatar()
{ {
try try
{ {
if(m_leapTracked != null) if(m_leapTracked != null)
m_leapTracked.OnCalibrateAvatar(); m_leapTracked.OnSetupAvatar();
OnHeadAttachChange(Settings.HeadAttach); OnHeadAttachChange(Settings.HeadAttach);
} }