[IKFixes] Fix Seated Play button not returning when trackers disconnect.

This commit is contained in:
NotAKidoS 2023-09-24 06:14:11 -05:00
parent b1cc584646
commit 1631effeff
3 changed files with 12 additions and 14 deletions

View file

@ -173,13 +173,6 @@ internal static class BodySystemPatches
int count = IKSystem.Instance.AllTrackingPoints.FindAll(m => m.isActive && m.isValid && m.suggestedRole > TrackingPoint.TrackingRole.Invalid).Count;
// fixes having all tracking points disabled forcing calibration
if (count == 0)
{
__instance._fbtAvailable = false;
return false;
}
// solid body count block
int num = 0;
if (BodySystem.enableLeftFootTracking) num++;
@ -190,10 +183,15 @@ internal static class BodySystemPatches
if (BodySystem.enableChestTracking) num++;
if (BodySystem.enableLeftElbowTracking) num++;
if (BodySystem.enableRightElbowTracking) num++;
__instance._fbtAvailable = (count >= num);
CVR_MenuManager.Instance.coreData.core.fullBodyActive = __instance._fbtAvailable = (count >= num && num != 0);
// fixes having all tracking points disabled forcing calibration
if (num == 0 || count == 0)
{
CVR_MenuManager.Instance.coreData.core.fullBodyActive = __instance._fbtAvailable = false;
return false;
}
CVR_MenuManager.Instance.coreData.core.fullBodyActive = __instance._fbtAvailable = (count >= num);
return false;
}

View file

@ -25,6 +25,6 @@ using System.Reflection;
namespace NAK.IKFixes.Properties;
internal static class AssemblyInfoParams
{
public const string Version = "1.0.8";
public const string Version = "1.0.9";
public const string Author = "NotAKidoS";
}

View file

@ -1,7 +1,7 @@
{
"_id": 142,
"name": "IKFixes",
"modversion": "1.0.8",
"modversion": "1.0.9",
"gameversion": "2023r172",
"loaderversion": "0.6.1",
"modtype": "Mod",
@ -19,6 +19,6 @@
],
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r21/IKFixes.dll",
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/IKFixes/",
"changelog": "- Updates for 2023r172\n- Removed unneeded settings (IKPose & NetIKPass).\n- Fixed halfbody fake root angle option.\n- Added Reset Settings UIExpansionKit button.\n- Fixed issue with MelonPref identifiers containing illegal characters.\n- Movement Parent IK handling now respects new orientation mode.",
"changelog": "- Fix Seated Play button not returning once disconnecting all trackers from SteamVR.",
"embedcolor": "f46e49"
}