qol stuff

two small fixes so thirdperson feels better to use

no longer scrolls while in menus or unity explorer, and frontview
This commit is contained in:
NotAKidoS 2023-04-25 18:04:14 -05:00
parent 31d199ec5a
commit 08d305f3a5
2 changed files with 3 additions and 2 deletions

View file

@ -34,7 +34,8 @@ public class ThirdPerson : MelonMod
public override void OnUpdate()
{
if (State)
// Prevents scrolling while in Menus or UnityExplorer
if (State && Cursor.lockState == CursorLockMode.Locked)
{
if (Input.GetAxis("Mouse ScrollWheel") > 0f) IncrementDist();
else if (Input.GetAxis("Mouse ScrollWheel") < 0f) DecrementDist();