mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
fucked
This commit is contained in:
parent
41068ce3fb
commit
b4fb9e62e6
5 changed files with 220 additions and 76 deletions
|
@ -72,26 +72,47 @@ class PlayerSetupPatches
|
|||
{
|
||||
BodySystem.TrackingEnabled = !____emotePlaying;
|
||||
IKSystem.vrik.solver?.Reset();
|
||||
DesktopVRIK_Helper.Instance?.OnResetIK();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
|
||||
//should probably patch movement system instead
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(PlayerSetup), "HandleDesktopCameraPosition")]
|
||||
private static void Postfix_PlayerSetup_HandleDesktopCameraPosition(bool ignore, ref PlayerSetup __instance, ref MovementSystem ____movementSystem, ref int ___headBobbingLevel)
|
||||
private static void Prefix_PlayerSetup_HandleDesktopCameraPosition
|
||||
(
|
||||
bool ignore,
|
||||
ref PlayerSetup __instance,
|
||||
ref MovementSystem
|
||||
____movementSystem,
|
||||
ref int ___headBobbingLevel
|
||||
)
|
||||
{
|
||||
if (DesktopVRIK.Setting_Enabled && DesktopVRIK.Setting_EnforceViewPosition)
|
||||
if (___headBobbingLevel != 2)
|
||||
{
|
||||
if (!____movementSystem.disableCameraControl || ignore)
|
||||
{
|
||||
if (___headBobbingLevel == 2 && DesktopVRIK.Instance.viewpoint != null)
|
||||
{
|
||||
__instance.desktopCamera.transform.localPosition = Vector3.zero;
|
||||
__instance.desktopCameraRig.transform.position = DesktopVRIK.Instance.viewpoint.position;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!DesktopVRIK.Setting_Enabled || !DesktopVRIK.Setting_EnforceViewPosition)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (____movementSystem.disableCameraControl && !ignore)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (DesktopVRIK.Instance.viewpoint == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
__instance.desktopCamera.transform.position = DesktopVRIK.Instance.viewpoint.position;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue