static void Postfix(ref float __result) { if (VRControls.mainControlsActive) { var joystick = VRControls.instance.GetJoyRightStickY(); isRunning = joystick < (VHVRConfig.ToggleRun() ? TOGGLE_RUN_SENSITIVITY : NON_TOGGLE_RUN_SENSITIVITY); isCrouching = joystick > CROUCH_SENSITIVITY; __result = __result + joystick; } }
static void Prefix(Player __instance, ref bool run) { if (__instance != Player.m_localPlayer || !VHVRConfig.UseVrControls()) { return; } if (VHVRConfig.ToggleRun()) { handleRunToggle(ref run); } else { run = ZInput_GetJoyRightStickY_Patch.isRunning; } }