mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
[ThirdPerson] Quick fix for DesktopVRSwitch.
This commit is contained in:
parent
30d37aefa1
commit
fb67a08c08
2 changed files with 9 additions and 0 deletions
|
@ -3,6 +3,7 @@ using ABI_RC.Core.Player;
|
|||
using MelonLoader;
|
||||
using System.Reflection;
|
||||
using static NAK.ThirdPerson.CameraLogic;
|
||||
using ABI_RC.Core;
|
||||
|
||||
namespace NAK.ThirdPerson;
|
||||
|
||||
|
@ -22,10 +23,15 @@ internal static class Patches
|
|||
typeof(PlayerSetup).GetMethod(nameof(PlayerSetup.SetupIKScaling), BindingFlags.NonPublic | BindingFlags.Instance),
|
||||
postfix: typeof(Patches).GetMethod(nameof(OnScaleAdjusted), BindingFlags.NonPublic | BindingFlags.Static).ToNewHarmonyMethod()
|
||||
);
|
||||
harmony.Patch(
|
||||
typeof(CVRTools).GetMethod(nameof(CVRTools.ConfigureHudAffinity), BindingFlags.Public | BindingFlags.Static),
|
||||
postfix: typeof(Patches).GetMethod(nameof(OnConfigureHudAffinity), BindingFlags.NonPublic | BindingFlags.Static).ToNewHarmonyMethod()
|
||||
);
|
||||
}
|
||||
|
||||
//Copy camera settings & postprocessing components
|
||||
private static void OnWorldStart() => CopyPlayerCamValues();
|
||||
//Adjust camera distance with height as modifier
|
||||
private static void OnScaleAdjusted(float height) => AdjustScale(height);
|
||||
private static void OnConfigureHudAffinity() => CheckVRMode();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue