mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
[ThirdPerson] Prevent scrolling when holding CTRL
This commit is contained in:
parent
84a096bc8e
commit
1025c5667c
3 changed files with 13 additions and 10 deletions
|
@ -18,14 +18,17 @@ public class ThirdPerson : MelonMod
|
|||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
// Prevents scrolling while in Menus or UnityExplorer
|
||||
if (State && Cursor.lockState == CursorLockMode.Locked)
|
||||
// Prevents scrolling while using Effector/BetterInteractDesktop
|
||||
if (!Input.GetKey(KeyCode.LeftControl))
|
||||
{
|
||||
float scroll = Input.GetAxis("Mouse ScrollWheel");
|
||||
if (scroll != 0f) ScrollDist(Mathf.Sign(scroll));
|
||||
// Prevents scrolling while in Menus or UnityExplorer
|
||||
if (State && Cursor.lockState == CursorLockMode.Locked)
|
||||
{
|
||||
float scroll = Input.GetAxis("Mouse ScrollWheel");
|
||||
if (scroll != 0f) ScrollDist(Mathf.Sign(scroll));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Input.GetKey(KeyCode.LeftControl)) 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);
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk"/>
|
||||
<Project Sdk="Microsoft.NET.Sdk" />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
"_id": 16,
|
||||
"name": "ThirdPerson",
|
||||
"modversion": "1.0.2",
|
||||
"modversion": "1.0.3",
|
||||
"gameversion": "2022r170",
|
||||
"loaderversion": "0.5.7",
|
||||
"modtype": "Mod",
|
||||
|
@ -14,9 +14,9 @@
|
|||
"third person"
|
||||
],
|
||||
"requirements": [],
|
||||
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/ThirdPerson.dll",
|
||||
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r8/ThirdPerson.dll",
|
||||
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/ThirdPerson",
|
||||
"changelog": "- Disable desktop camera while in thirdperson for performance.\n- Add cycle backward modifier while holding Shift.\n- Fixed bug where loading into a world in thirdperson broke nameplates. (imagine using Camera.main)",
|
||||
"changelog": "- Submit changes I made three weeks ago and forgot about... no longer disables desktop camera, so no more null ref errors with nameplates & camera indicator.",
|
||||
"embedcolor": "F61961"
|
||||
}
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue