From 84fe655eb55f40ade365c900457fa020826185b7 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Sat, 24 Jun 2023 01:39:41 -0500 Subject: [PATCH] [AvatarScaleMod] Remove PlaySpaceScaleFix --- AvatarScale/HarmonyPatches.cs | 30 ------------------------------ NAK_CVR_Mods.sln | 6 ++++++ 2 files changed, 6 insertions(+), 30 deletions(-) diff --git a/AvatarScale/HarmonyPatches.cs b/AvatarScale/HarmonyPatches.cs index d91a872..bcec986 100644 --- a/AvatarScale/HarmonyPatches.cs +++ b/AvatarScale/HarmonyPatches.cs @@ -25,36 +25,6 @@ class PlayerSetupPatches AvatarScaleMod.Logger.Error(e); } } - - static Vector3 originalPosition; - - [HarmonyPrefix] - [HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.SetPlaySpaceScale))] - static void Prefix_PlayerSetup_SetPlaySpaceScale(ref PlayerSetup __instance) - { - originalPosition = __instance.vrCamera.transform.position; - originalPosition.y = __instance.transform.position.y; - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.SetPlaySpaceScale))] - static void Postfix_PlayerSetup_SetPlaySpaceScale(ref PlayerSetup __instance) - { - Vector3 newPosition = __instance.vrCamera.transform.position; - newPosition.y = __instance.transform.position.y; - - Vector3 offset = newPosition - originalPosition; - - // Apply the offset to the VR camera rig's position - __instance.transform.position -= offset; - - //if (IKSystem.vrik != null) - //{ - // IKSystem.vrik.solver.locomotion.AddDeltaPosition(offset * 2); - // IKSystem.vrik.solver.raycastOriginPelvis += offset * 2; - // IKSystem.vrik.solver.Reset(); - //} - } } class PuppetMasterPatches diff --git a/NAK_CVR_Mods.sln b/NAK_CVR_Mods.sln index bbefbd3..a6ad22d 100644 --- a/NAK_CVR_Mods.sln +++ b/NAK_CVR_Mods.sln @@ -67,6 +67,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControllerFreeze", "Control EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FuckCohtmlResourceHandler", "FuckCohtmlResourceHandler\FuckCohtmlResourceHandler.csproj", "{EB73DB1B-62BD-4258-BA85-D3ACAB7CBE91}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PlaySpaceScaleFix", "PlaySpaceScaleFix\PlaySpaceScaleFix.csproj", "{61368493-5B0E-489B-828C-DE10428AB81A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -201,6 +203,10 @@ Global {EB73DB1B-62BD-4258-BA85-D3ACAB7CBE91}.Debug|Any CPU.Build.0 = Debug|Any CPU {EB73DB1B-62BD-4258-BA85-D3ACAB7CBE91}.Release|Any CPU.ActiveCfg = Release|Any CPU {EB73DB1B-62BD-4258-BA85-D3ACAB7CBE91}.Release|Any CPU.Build.0 = Release|Any CPU + {61368493-5B0E-489B-828C-DE10428AB81A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {61368493-5B0E-489B-828C-DE10428AB81A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {61368493-5B0E-489B-828C-DE10428AB81A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {61368493-5B0E-489B-828C-DE10428AB81A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE