mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
further cleanup of repo
This commit is contained in:
parent
4f8dcb0cd0
commit
323eb92f2e
140 changed files with 1 additions and 2430 deletions
|
@ -1,36 +0,0 @@
|
|||
using System.Collections;
|
||||
using ABI_RC.Core.Base;
|
||||
using ABI_RC.Core.Player;
|
||||
using MelonLoader;
|
||||
using NAK.OriginShift;
|
||||
using NAK.OriginShift.Hacks;
|
||||
using UnityEngine;
|
||||
using AccessTools = HarmonyLib.AccessTools;
|
||||
using HarmonyMethod = HarmonyLib.HarmonyMethod;
|
||||
|
||||
namespace OriginShift.Integrations;
|
||||
|
||||
public static class ThirdPersonAddon
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
OriginShiftMod.HarmonyInst.Patch(
|
||||
AccessTools.Method(typeof(PlayerSetup), nameof(PlayerSetup.Start)),
|
||||
postfix: new HarmonyMethod(typeof(ThirdPersonAddon), nameof(OnPostPlayerSetupStart))
|
||||
);
|
||||
}
|
||||
|
||||
private static void OnPostPlayerSetupStart()
|
||||
{
|
||||
OriginShiftMod.Logger.Msg("Found ThirdPerson, fixing compatibility...");
|
||||
MelonCoroutines.Start(FixThirdPersonCompatibility());
|
||||
}
|
||||
|
||||
private static IEnumerator FixThirdPersonCompatibility()
|
||||
{
|
||||
yield return null; // wait a frame for the camera to be setup
|
||||
GameObject thirdPersonCameraObj = GameObject.Find("_PLAYERLOCAL/[CameraRigDesktop]/Camera/ThirdPersonCameraObj");
|
||||
thirdPersonCameraObj.AddComponentIfMissing<OriginShiftOcclusionCullingDisabler>();
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue