mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-01 13:59:22 +00:00
25 lines
No EOL
829 B
C#
25 lines
No EOL
829 B
C#
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;
|
|
}
|
|
}
|
|
} |