mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
27 lines
No EOL
1,002 B
C#
27 lines
No EOL
1,002 B
C#
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();
|
|
} |