This commit is contained in:
NotAKidoS 2023-02-02 22:54:47 -06:00
parent 2bfe904adb
commit fcc83aa570
6 changed files with 188 additions and 0 deletions

25
FuckToes/FuckToes.cs Normal file
View file

@ -0,0 +1,25 @@
using ABI_RC.Core.Savior;
using HarmonyLib;
using RootMotion.FinalIK;
namespace NAK.Melons.FuckToes.HarmonyPatches;
//yes im patching VRIK directly, cvr does not force calibration or mess with references, and leaves it to vrik to handle
class VRIKPatches
{
[HarmonyPostfix]
[HarmonyPatch(typeof(VRIK), "AutoDetectReferences")]
private static void Postfix_VRIK_AutoDetectReferences(ref VRIK __instance)
{
//only run for PlayerLocal VRIK
if (__instance.gameObject.layer != 8) return;
if (FuckToesMod.m_entryEnabledVR.Value && MetaPort.Instance.isUsingVr)
{
if (!FuckToesMod.m_entryEnabledFBT.Value && MetaPort.Instance.isUsingFullbody) return;
__instance.references.leftToes = null;
__instance.references.rightToes = null;
}
}
}