mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
21 lines
No EOL
604 B
C#
21 lines
No EOL
604 B
C#
using ABI_RC.Core.Player;
|
|
using HarmonyLib;
|
|
|
|
namespace Blackout;
|
|
|
|
[HarmonyPatch]
|
|
internal class HarmonyPatches
|
|
{
|
|
//Support for changing VRMode during runtime.
|
|
[HarmonyPostfix]
|
|
[HarmonyPatch(typeof(PlayerSetup), "CalibrateAvatar")]
|
|
private static void CheckVRModeOnSwitch()
|
|
{
|
|
if (Blackout.inVR != PlayerSetup.Instance._inVr)
|
|
{
|
|
Blackout.inVR = PlayerSetup.Instance._inVr;
|
|
BlackoutController.Instance.SetupBlackoutInstance();
|
|
BlackoutController.Instance.ChangeBlackoutState(BlackoutController.BlackoutState.Awake);
|
|
}
|
|
}
|
|
} |