mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-05 19:39:21 +00:00
Fix of ragdolling with hips IK override option enabled
Hiding settings from UIExpansionKit
This commit is contained in:
parent
f983f2909c
commit
b36f1009d9
14 changed files with 61 additions and 23 deletions
32
ml_amt/ModSupporter.cs
Normal file
32
ml_amt/ModSupporter.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
using System.Collections;
|
||||
using System.Linq;
|
||||
|
||||
namespace ml_amt
|
||||
{
|
||||
static class ModSupporter
|
||||
{
|
||||
static bool ms_ragdollMod = false;
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
if(MelonLoader.MelonMod.RegisteredMelons.FirstOrDefault(m => m.Info.Name == "PlayerRagdollMod") != null)
|
||||
MelonLoader.MelonCoroutines.Start(WaitForRagdollInstance());
|
||||
}
|
||||
|
||||
// PlayerRagdollMod support
|
||||
static IEnumerator WaitForRagdollInstance()
|
||||
{
|
||||
while(ml_prm.RagdollController.Instance == null)
|
||||
yield return null;
|
||||
|
||||
ms_ragdollMod = true;
|
||||
}
|
||||
static bool IsRagdolled() => ml_prm.RagdollController.Instance.IsRagdolled();
|
||||
public static bool SkipHipsOverride()
|
||||
{
|
||||
bool l_result = false;
|
||||
l_result |= (ms_ragdollMod && IsRagdolled());
|
||||
return l_result;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue