mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
[PathCamDisabler] Fixes for 2023r171
This commit is contained in:
parent
0e9f7566da
commit
2d6c4a3fc5
4 changed files with 50 additions and 36 deletions
26
PathCamDisabler/HarmonyPatches.cs
Normal file
26
PathCamDisabler/HarmonyPatches.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
using ABI_RC.Core.IO;
|
||||
using ABI_RC.Systems.InputManagement.InputModules;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace NAK.PathCamDisabler.HarmonyPatches;
|
||||
|
||||
internal class CVRPathCamControllerPatches
|
||||
{
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(CVRPathCamController), nameof(CVRPathCamController.Update))]
|
||||
private static void Prefix_CVRPathCamController_Update(ref bool __runOriginal)
|
||||
{
|
||||
__runOriginal &= !PathCamDisabler.EntryDisablePathCam.Value;
|
||||
}
|
||||
}
|
||||
|
||||
internal class CVRInputModule_KeyboardPatches
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(CVRInputModule_Keyboard), nameof(CVRInputModule_Keyboard.Update_Binds))]
|
||||
private static void Postfix_CVRInputModule_Keyboard_Update_Binds(ref CVRInputModule_Keyboard __instance)
|
||||
{
|
||||
if (PathCamDisabler.EntryDisableFlightBind.Value)
|
||||
__instance._inputManager.toggleFlight = false;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue