[OriginShift] Fixes for ThirdPerson & Ragdoll

This commit is contained in:
NotAKidoS 2024-06-18 14:42:15 -05:00
parent 69e6298281
commit c75fc028d3
7 changed files with 118 additions and 17 deletions

View file

@ -0,0 +1,17 @@
using ABI_RC.Core.Base;
using NAK.OriginShift;
using NAK.OriginShift.Hacks;
using UnityEngine;
namespace OriginShift.ModCompatibility;
public static class ThirdPersonCompatibility
{
internal static void Fix()
{
GameObject thirdPersonCameraObj = GameObject.Find("_PLAYERLOCAL/[CameraRigDesktop]/Camera/ThirdPersonCameraObj");
if (thirdPersonCameraObj == null) return;
OriginShiftMod.Logger.Msg("Found ThirdPerson, fixing compatibility...");
thirdPersonCameraObj.AddComponentIfMissing<OriginShiftOcclusionCullingDisabler>();
}
}