[DesktopVRSwitch] Further cleanup

This commit is contained in:
NotAKidoS 2023-06-21 14:25:56 -05:00
parent 6774c3ff6d
commit f89a41772b
5 changed files with 14 additions and 23 deletions

View file

@ -25,7 +25,7 @@ public class CVRWorldTracker : VRModeTracker
CVRWorld.Instance.UpdatePostProcessing();
UpdateCVRDesktopCameraController();
}
private void UpdateCVRDesktopCameraController()
{
// Just making sure- Starting in VR will not call Start() as rig is disabled

View file

@ -16,14 +16,6 @@ public class CheckVRTracker : VRModeTracker
private void OnPostSwitch(bool intoVR)
{
CheckVR _checkVR = CheckVR.Instance;
if (_checkVR == null)
{
DesktopVRSwitch.Logger.Error("Error while getting CheckVR!");
return;
}
DesktopVRSwitch.Logger.Msg($"Setting CheckVR hasVrDeviceLoaded to {intoVR}.");
_checkVR.hasVrDeviceLoaded = intoVR;
CheckVR.Instance.hasVrDeviceLoaded = intoVR;
}
}

View file

@ -52,7 +52,7 @@ public class IKSystemTracker : VRModeTracker
BodySystem.isCalibratedAsFullBody = false;
BodySystem.isCalibrating = false;
BodySystem.isRecalibration = false;
// Make it so you don't instantly end up in FBT from Desktop
IKSystem.firstAvatarLoaded = DesktopVRSwitch.EntryEnterCalibrationOnSwitch.Value;

View file

@ -35,7 +35,7 @@ public class MovementSystemTracker : VRModeTracker
MovementSystem.Instance.ChangeCrouch(false);
MovementSystem.Instance.ChangeProne(false);
MovementSystem.Instance.SetImmobilized(true);
}
private void OnFailedSwitch(bool intoVR)
@ -50,7 +50,7 @@ public class MovementSystemTracker : VRModeTracker
// Lazy
MelonLoader.MelonCoroutines.Start(TeleportFrameAfter(intoVR));
}
private IEnumerator TeleportFrameAfter(bool intoVR)
{
yield return null; // need to wait a frame
@ -66,7 +66,7 @@ public class MovementSystemTracker : VRModeTracker
MovementSystem.Instance.ChangeCrouch(false);
MovementSystem.Instance.ChangeProne(false);
MovementSystem.Instance.SetImmobilized(false);
yield break;
}
}