This commit is contained in:
NotAKidoS 2023-02-28 07:16:32 -06:00
parent cbd65aa813
commit a27d42d876
3 changed files with 113 additions and 105 deletions

View file

@ -40,12 +40,12 @@ class PlayerSetupPatches
DesktopVRIK.Instance?.OnPlayerSetupUpdate(____emotePlaying);
}
//[HarmonyPostfix]
//[HarmonyPatch(typeof(PlayerSetup), "ReCalibrateAvatar")]
//static void Postfix_PlayerSetup_ReCalibrateAvatar()
//{
// DesktopVRIK.Instance?.OnReCalibrateAvatar();
//}
[HarmonyPrefix]
[HarmonyPatch(typeof(PlayerSetup), "SetupIKScaling")]
private static bool Prefix_PlayerSetup_SetupIKScaling(float height, ref Vector3 ___scaleDifference)
{
return !(bool)DesktopVRIK.Instance?.OnSetupIKScaling(height, 1f + ___scaleDifference.y);
}
}
class IKSystemPatches
@ -56,11 +56,4 @@ class IKSystemPatches
{
__instance.gameObject.AddComponent<DesktopVRIK>();
}
[HarmonyPrefix]
[HarmonyPatch(typeof(IKSystem), "ApplyAvatarScaleToIk")]
private static bool Prefix_IKSystem_ApplyAvatarScaleToIk(float height)
{
return !(bool)DesktopVRIK.Instance?.OnApplyAvatarScaleToIk(height);
}
}