This commit is contained in:
NotAKidoS 2023-02-17 07:40:22 -06:00
parent a55f1fb739
commit 7403b6c3e7
2 changed files with 5 additions and 1 deletions

View file

@ -22,6 +22,8 @@ internal class PlayerSetupPatches
vrRightHandTracker = __instance.vrRightHandTracker.AddComponent<SteamVR_TrackedObject>(); vrRightHandTracker = __instance.vrRightHandTracker.AddComponent<SteamVR_TrackedObject>();
vrLeftHandPose = __instance.vrLeftHandTracker.GetComponent<SteamVR_Behaviour_Pose>(); vrLeftHandPose = __instance.vrLeftHandTracker.GetComponent<SteamVR_Behaviour_Pose>();
vrRightHandPose = __instance.vrRightHandTracker.GetComponent<SteamVR_Behaviour_Pose>(); vrRightHandPose = __instance.vrRightHandTracker.GetComponent<SteamVR_Behaviour_Pose>();
vrLeftHandPose.enabled = false;
vrRightHandPose.enabled = false;
} }
[HarmonyPrefix] [HarmonyPrefix]
@ -32,11 +34,13 @@ internal class PlayerSetupPatches
// but this is the best way to support DesktopVRSwitch & not redo the controller inputs // but this is the best way to support DesktopVRSwitch & not redo the controller inputs
if (vrLeftHandTracker != null) if (vrLeftHandTracker != null)
{ {
vrLeftHandPose.enabled = true;
vrLeftHandTracker.SetDeviceIndex(vrLeftHandPose.GetDeviceIndex()); vrLeftHandTracker.SetDeviceIndex(vrLeftHandPose.GetDeviceIndex());
vrLeftHandPose.enabled = false; vrLeftHandPose.enabled = false;
} }
if (vrRightHandTracker != null) if (vrRightHandTracker != null)
{ {
vrRightHandPose.enabled = true;
vrRightHandTracker.SetDeviceIndex(vrRightHandPose.GetDeviceIndex()); vrRightHandTracker.SetDeviceIndex(vrRightHandPose.GetDeviceIndex());
vrRightHandPose.enabled = false; vrRightHandPose.enabled = false;
} }

View file

@ -25,6 +25,6 @@ using System.Reflection;
namespace NAK.Melons.TrackedControllerFix.Properties; namespace NAK.Melons.TrackedControllerFix.Properties;
internal static class AssemblyInfoParams internal static class AssemblyInfoParams
{ {
public const string Version = "1.0.0"; public const string Version = "1.0.1";
public const string Author = "NotAKidoS"; public const string Author = "NotAKidoS";
} }