mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
push
This commit is contained in:
parent
dc577c3a2f
commit
a468487850
24 changed files with 484 additions and 121 deletions
27
ThirdPerson/Patches.cs
Normal file
27
ThirdPerson/Patches.cs
Normal file
|
@ -0,0 +1,27 @@
|
|||
using ABI.CCK.Components;
|
||||
using ABI_RC.Core.InteractionSystem;
|
||||
using ABI_RC.Core.Player;
|
||||
using MelonLoader;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using static ThirdPerson.CameraLogic;
|
||||
|
||||
namespace ThirdPerson;
|
||||
|
||||
internal static class Patches
|
||||
{
|
||||
internal static void Apply(HarmonyLib.Harmony harmony)
|
||||
{
|
||||
harmony.Patch(
|
||||
typeof(CVRWorld).GetMethod("SetDefaultCamValues", BindingFlags.NonPublic | BindingFlags.Instance),
|
||||
postfix: typeof(Patches).GetMethod(nameof(OnWorldStart), BindingFlags.NonPublic | BindingFlags.Static).ToNewHarmonyMethod()
|
||||
);
|
||||
harmony.Patch(
|
||||
typeof(CVRWorld).GetMethod("CopyRefCamValues", BindingFlags.NonPublic | BindingFlags.Instance),
|
||||
postfix: typeof(Patches).GetMethod(nameof(OnWorldStart), BindingFlags.NonPublic | BindingFlags.Static).ToNewHarmonyMethod()
|
||||
);
|
||||
}
|
||||
|
||||
//Copy camera settings & postprocessing components
|
||||
private static void OnWorldStart() => CopyFromPlayerCam();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue