Fixes for 24/06/2025 nightly build

This commit is contained in:
SDraw 2025-06-24 21:45:18 +03:00
parent 0902edd560
commit 40b683d33c
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
18 changed files with 93 additions and 86 deletions

View file

@ -53,7 +53,7 @@ namespace ml_lme
);
p_instance.Patch(
typeof(PlayerSetup).GetMethod(nameof(PlayerSetup.SetControllerRayScale), BindingFlags.Instance | BindingFlags.Public),
typeof(PlayerSetup).GetMethod("SetControllerRayScale", BindingFlags.Instance | BindingFlags.NonPublic),
null,
new HarmonyLib.HarmonyMethod(typeof(GameEvents).GetMethod(nameof(OnRayScale_Postfix), BindingFlags.Static | BindingFlags.NonPublic))
);

View file

@ -281,7 +281,7 @@ namespace ml_lme
void OnAvatarSetup()
{
Animator l_animator = PlayerSetup.Instance._animator;
Animator l_animator = PlayerSetup.Instance.Animator;
if(l_animator.isHuman)
{
Utils.SetAvatarTPose();
@ -313,7 +313,7 @@ namespace ml_lme
void OnAvatarReuse()
{
// Old VRIK is destroyed by game
m_vrIK = PlayerSetup.Instance._animator.GetComponent<VRIK>();
m_vrIK = PlayerSetup.Instance.AvatarObject.GetComponent<VRIK>();
if(Utils.IsInVR())
RemoveArmIK();
@ -409,7 +409,7 @@ namespace ml_lme
void SetupArmIK()
{
Animator l_animator = PlayerSetup.Instance._animator;
Animator l_animator = PlayerSetup.Instance.Animator;
Transform l_chest = l_animator.GetBoneTransform(HumanBodyBones.UpperChest);
if(l_chest == null)
l_chest = l_animator.GetBoneTransform(HumanBodyBones.Chest);
@ -472,7 +472,7 @@ namespace ml_lme
LeapTracking.Instance.Rebind(PlayerSetup.Instance.transform.rotation);
// Align rotations of leap fingers to avatar fingers
Animator l_animator = PlayerSetup.Instance._animator;
Animator l_animator = PlayerSetup.Instance.Animator;
LeapHand l_leapLeft = LeapTracking.Instance.GetLeftHand();
LeapHand l_leapRight = LeapTracking.Instance.GetRightHand();
// Try to "fix" rotations, slightly inaccurate after 0YX plane rotation

View file

@ -136,7 +136,7 @@ namespace ml_lme
{
if(Settings.Enabled)
{
Transform l_camera = PlayerSetup.Instance.GetActiveCamera().transform;
Transform l_camera = PlayerSetup.Instance.activeCam.transform;
m_root.position = l_camera.position;
m_root.rotation = (Settings.HeadAttach ? l_camera.rotation : PlayerSetup.Instance.GetPlayerRotation());

View file

@ -59,8 +59,8 @@ namespace ml_lme
public static void SetAvatarTPose()
{
IKSystem.Instance.SetAvatarPose(IKSystem.AvatarPose.TPose);
PlayerSetup.Instance._avatar.transform.localPosition = Vector3.zero;
PlayerSetup.Instance._avatar.transform.localRotation = Quaternion.identity;
PlayerSetup.Instance.AvatarTransform.localPosition = Vector3.zero;
PlayerSetup.Instance.AvatarTransform.localRotation = Quaternion.identity;
}
public static void Swap<T>(ref T lhs, ref T rhs)