mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2026-06-25 15:58:13 +00:00
[NAK_CVR_Mods] Unfucked for 2026r182
This commit is contained in:
parent
c13dc8375a
commit
281403d68b
209 changed files with 3936 additions and 1122 deletions
|
|
@ -1,38 +0,0 @@
|
|||
using ABI_RC.Systems.GameEventSystem;
|
||||
using MelonLoader;
|
||||
using UnityEngine;
|
||||
using static NAK.ThirdPerson.CameraLogic;
|
||||
|
||||
namespace NAK.ThirdPerson;
|
||||
|
||||
public class ThirdPerson : MelonMod
|
||||
{
|
||||
internal static MelonLogger.Instance Logger;
|
||||
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
Logger = LoggerInstance;
|
||||
|
||||
Patches.Apply(HarmonyInstance);
|
||||
CVRGameEventSystem.Initialization.OnPlayerSetupStart.AddListener(SetupCamera);
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
// Prevents scrolling while using Effector/BetterInteractDesktop
|
||||
if (!Input.GetKey(KeyCode.LeftControl))
|
||||
{
|
||||
// Prevents scrolling while in Menus or UnityExplorer
|
||||
if (!State || Cursor.lockState != CursorLockMode.Locked)
|
||||
return;
|
||||
|
||||
float scroll = Input.GetAxis("Mouse ScrollWheel");
|
||||
if (scroll != 0f) ScrollDist(Mathf.Sign(scroll));
|
||||
return;
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.T)) State = !State;
|
||||
if (!State || !Input.GetKeyDown(KeyCode.Y)) return;
|
||||
RelocateCam((CameraLocation)(((int)CurrentLocation + (Input.GetKey(KeyCode.LeftShift) ? -1 : 1) + Enum.GetValues(typeof(CameraLocation)).Length) % Enum.GetValues(typeof(CameraLocation)).Length), true);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue