mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
[ThirdPerson] Fixed VRSwitch issue, fixed Zoom check NRE
This commit is contained in:
parent
e12da22513
commit
312ce65a28
3 changed files with 8 additions and 13 deletions
|
@ -34,7 +34,9 @@ internal static class CameraLogic
|
|||
get => _state;
|
||||
set
|
||||
{
|
||||
if (_state == value) return;
|
||||
_state = !CheckIsRestricted() && value;
|
||||
|
||||
if (_state) _storedCamMask = _desktopCam.cullingMask;
|
||||
_desktopCam.cullingMask = _state ? 0 : _storedCamMask;
|
||||
_uiCam.cullingMask = _state ? _uiCam.cullingMask & ~(1 << CVRLayers.PlayerClone) : _uiCam.cullingMask | (1 << CVRLayers.PlayerClone);
|
||||
|
@ -114,14 +116,7 @@ internal static class CameraLogic
|
|||
internal static void ScrollDist(float sign) { _dist += sign * 0.25f; RelocateCam(CurrentLocation); }
|
||||
internal static void AdjustScale(float height) { _scale = height; RelocateCam(CurrentLocation); }
|
||||
internal static void CheckVRMode() { if (MetaPort.Instance.isUsingVr) State = false; }
|
||||
|
||||
private static bool CheckIsRestricted()
|
||||
=> !CVRWorld.Instance.enableZoom;
|
||||
|
||||
internal static bool ShouldNotHideHead_ThirdPerson(Camera cam)
|
||||
{
|
||||
if (cam != _desktopCam)
|
||||
return true; // we dont care
|
||||
|
||||
return !State;
|
||||
}
|
||||
=> CVRWorld.Instance != null && !CVRWorld.Instance.enableZoom;
|
||||
}
|
|
@ -27,6 +27,6 @@ using System.Reflection;
|
|||
namespace NAK.ThirdPerson.Properties;
|
||||
internal static class AssemblyInfoParams
|
||||
{
|
||||
public const string Version = "1.0.8";
|
||||
public const string Version = "1.0.9";
|
||||
public const string Author = "Davi & NotAKidoS";
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
"_id": 16,
|
||||
"name": "ThirdPerson",
|
||||
"modversion": "1.0.8",
|
||||
"modversion": "1.0.9",
|
||||
"gameversion": "2024r175",
|
||||
"loaderversion": "0.6.1",
|
||||
"modtype": "Mod",
|
||||
|
@ -14,9 +14,9 @@
|
|||
"third person"
|
||||
],
|
||||
"requirements": [],
|
||||
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r25/ThirdPerson.dll",
|
||||
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r26/ThirdPerson.dll",
|
||||
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/ThirdPerson",
|
||||
"changelog": "- Recompiled to work with 2024r175",
|
||||
"changelog": "- Fixed an issue where VR Switching without using ThirdPerson prior would incorrectly set the Desktop camera culling mask to 0\n- Fixed an NRE when checking CVRWorld zoom rule when no CVRWorld instance was found",
|
||||
"embedcolor": "#F61961"
|
||||
}
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue