[ThirdPerson] Fix for game issue, reset player camera culling mask to default on world load.

This commit is contained in:
NotAKidoS 2023-09-25 14:08:05 -05:00
parent afb44fc3a7
commit 53c369b950
4 changed files with 66 additions and 47 deletions

View file

@ -22,13 +22,14 @@ public class ThirdPerson : MelonMod
if (!Input.GetKey(KeyCode.LeftControl))
{
// 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));
}
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);