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
23
.Deprecated/HeadLookLockingInputFix/Main.cs
Normal file
23
.Deprecated/HeadLookLockingInputFix/Main.cs
Normal file
|
@ -0,0 +1,23 @@
|
|||
using System.Reflection;
|
||||
using ABI_RC.Core.Player;
|
||||
using ABI_RC.Core.Savior;
|
||||
using HarmonyLib;
|
||||
using MelonLoader;
|
||||
|
||||
namespace NAK.HeadLookLockingInputFix;
|
||||
|
||||
public class HeadLookLockingInputFixMod : MelonMod
|
||||
{
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
HarmonyInstance.Patch(
|
||||
typeof(InputManager).GetMethod(nameof(InputManager.HandleMenuHeadLook),
|
||||
BindingFlags.NonPublic | BindingFlags.Instance),
|
||||
prefix: new HarmonyMethod(typeof(HeadLookLockingInputFixMod).GetMethod(nameof(OnPreHandleMenuHeadLook),
|
||||
BindingFlags.NonPublic | BindingFlags.Static))
|
||||
);
|
||||
}
|
||||
|
||||
private static bool OnPreHandleMenuHeadLook()
|
||||
=> !MetaPort.Instance.isUsingVr; // only execute in Desktop
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue