Move many mods to Deprecated folder, fix spelling

This commit is contained in:
NotAKidoS 2025-04-03 02:57:35 -05:00
parent 5e822cec8d
commit 0042590aa6
539 changed files with 7475 additions and 3120 deletions

View file

@ -0,0 +1,33 @@
using ABI.CCK.Components;
using UnityEngine;
namespace NAK.DesktopVRSwitch.VRModeTrackers;
public class CVRPickupObjectTracker : MonoBehaviour
{
internal CVRPickupObject _pickupObject;
internal Transform _storedGripOrigin;
private void Start()
{
VRModeSwitchManager.OnPostVRModeSwitch += OnPostSwitch;
}
private void OnDestroy()
{
VRModeSwitchManager.OnPostVRModeSwitch -= OnPostSwitch;
}
public void OnPostSwitch(object sender, VRModeSwitchManager.VRModeEventArgs args)
{
if (_pickupObject == null)
return;
// Drop the object if it is being held locally
if (_pickupObject._controllerRay != null)
_pickupObject._controllerRay.DropObject(true);
// Swap the grip origins
(_storedGripOrigin, _pickupObject.gripOrigin) = (_pickupObject.gripOrigin, _storedGripOrigin);
}
}