major cleanup

This commit is contained in:
NotAKidoS 2023-04-26 15:32:02 -05:00
parent b33e15377f
commit e5242f76c7
85 changed files with 584 additions and 571 deletions

View file

@ -0,0 +1,25 @@
using ABI_RC.Core.Savior;
using HarmonyLib;
using RootMotion.FinalIK;
namespace NAK.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 (FuckToes.EntryEnabledVR.Value && MetaPort.Instance.isUsingVr)
{
if (!FuckToes.EntryEnabledFBT.Value && MetaPort.Instance.isUsingFullbody) return;
__instance.references.leftToes = null;
__instance.references.rightToes = null;
}
}
}