mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 22:39:22 +00:00
Move many mods to Deprecated folder, fix spelling
This commit is contained in:
parent
5e822cec8d
commit
0042590aa6
539 changed files with 7475 additions and 3120 deletions
|
@ -0,0 +1,29 @@
|
|||
using ABI_RC.Systems.IK;
|
||||
using ABI_RC.Systems.IK.TrackingModules;
|
||||
using ABI_RC.Systems.InputManagement;
|
||||
using ABI_RC.Systems.InputManagement.XR.Modules;
|
||||
|
||||
namespace NAK.DesktopVRSwitch.Patches;
|
||||
|
||||
internal static class SteamVRNullReferencePatch
|
||||
{
|
||||
public static void DestroySteamVRInstancesImmediate()
|
||||
{
|
||||
// set to null so input manager doesnt attempt to access it
|
||||
if (CVRInputManager._moduleXR != null)
|
||||
{
|
||||
if (CVRInputManager._moduleXR._leftModule != null)
|
||||
if (CVRInputManager._moduleXR._leftModule is CVRXRModule_SteamVR leftModule) leftModule._steamVr = null;
|
||||
if (CVRInputManager._moduleXR._rightModule != null)
|
||||
if (CVRInputManager._moduleXR._rightModule is CVRXRModule_SteamVR rightModule) rightModule._steamVr = null;
|
||||
}
|
||||
|
||||
if (IKSystem.Instance == null)
|
||||
return;
|
||||
|
||||
// set to null so tracking module doesnt attempt to access it
|
||||
foreach (TrackingModule module in IKSystem.Instance._trackingModules)
|
||||
if (module is SteamVRTrackingModule steamVRModule)
|
||||
steamVRModule._steamVr = null;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue