mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
[GestureLock] Fixes for 2023r171
This commit is contained in:
parent
ffca0b8f3f
commit
3720b1f3c8
1 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,7 @@ internal class CVRInputModule_XRPatches
|
|||
{
|
||||
// Get input from SteamVR because new input system is nerfed for OpenXR...
|
||||
private static readonly SteamVR_Action_Boolean _gestureToggleButton = SteamVR_Input.GetAction<SteamVR_Action_Boolean>("ControllerToggleGestures", false);
|
||||
|
||||
|
||||
private static bool _isLocked;
|
||||
private static float _oldGestureLeft;
|
||||
private static float _oldGestureRight;
|
||||
|
@ -20,7 +20,7 @@ internal class CVRInputModule_XRPatches
|
|||
[HarmonyPatch(typeof(CVRInputModule_XR), nameof(CVRInputModule_XR.Update_Emotes))]
|
||||
private static void Postfix_CVRInputModule_XR_Update_Emotes(ref CVRInputModule_XR __instance)
|
||||
{
|
||||
if (!MetaPort.Instance.isUsingVr)
|
||||
if (!MetaPort.Instance.isUsingVr)
|
||||
return;
|
||||
|
||||
bool leftInput = _gestureToggleButton.GetLastStateDown(SteamVR_Input_Sources.LeftHand);
|
||||
|
@ -31,7 +31,7 @@ internal class CVRInputModule_XRPatches
|
|||
|
||||
if (rightInput && __instance._rightModule.Type == EXRControllerType.Index || __instance._inputManager.oneHanded)
|
||||
return;
|
||||
|
||||
|
||||
if (leftInput || rightInput)
|
||||
{
|
||||
_isLocked = !_isLocked;
|
||||
|
@ -42,7 +42,7 @@ internal class CVRInputModule_XRPatches
|
|||
|
||||
if (!_isLocked)
|
||||
return;
|
||||
|
||||
|
||||
__instance._inputManager.gestureLeft = _oldGestureLeft;
|
||||
__instance._inputManager.gestureRight = _oldGestureRight;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue