polish my pain

This commit is contained in:
NotAKidoS 2023-01-03 21:38:23 -06:00
parent 4a5527d7de
commit 367a167469
5 changed files with 35 additions and 57 deletions

View file

@ -1,16 +1,11 @@
using System;
using System.Reflection;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using ABI_RC.Core;
using ABI_RC.Core.InteractionSystem;
using ABI_RC.Core.Player;
using ABI_RC.Core.Savior;
using ABI_RC.Core;
using ABI_RC.Systems.MovementSystem;
using HarmonyLib;
using System.Reflection;
using UnityEngine;
namespace NAK.Melons.MenuScalePatch.Helpers;
@ -46,16 +41,22 @@ public class MSP_MenuInfo
public static void HandleIndependentLookInput()
{
//angle of independent look axis
float angle = (float)ms_followAngleY.GetValue(MovementSystem.Instance);
bool isPressed = CVRInputManager.Instance.independentHeadTurn;
bool isPressed = CVRInputManager.Instance.independentHeadTurn || CVRInputManager.Instance.independentHeadToggle;
if (isPressed && !independentHeadTurn)
{
independentHeadTurn = true;
MSP_MenuInfo.ToggleDesktopInputMethod(false);
}else if (!isPressed && independentHeadTurn && angle == 0f)
QuickMenuHelper.Instance.UpdateWorldAnchors();
MainMenuHelper.Instance.UpdateWorldAnchors();
}
else if (!isPressed && independentHeadTurn)
{
independentHeadTurn = false;
MSP_MenuInfo.ToggleDesktopInputMethod(true);
float angle = (float)ms_followAngleY.GetValue(MovementSystem.Instance);
if (angle == 0f)
{
independentHeadTurn = false;
MSP_MenuInfo.ToggleDesktopInputMethod(true);
}
}
}
}