mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-03 18:39:23 +00:00
Override prevention option
This commit is contained in:
parent
cb26ab1e6c
commit
24699622e5
4 changed files with 31 additions and 5 deletions
|
@ -239,12 +239,12 @@ namespace ml_amt
|
|||
|
||||
static bool OnAnimationOverride_Prefix()
|
||||
{
|
||||
return false;
|
||||
return !Settings.OverrideFix;
|
||||
}
|
||||
|
||||
static bool OnAnimationOverrideRestore_Prefix()
|
||||
{
|
||||
return false;
|
||||
return !Settings.OverrideFix;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,8 @@ Available mod's settings in `Settings - IK - Avatar Motion Tweaker`:
|
|||
* **Adjusted locomotion mass center:** automatically changes IK locomotion center if avatar has toe bones; default value - `true`.
|
||||
* Note: Compatible with [DesktopVRIK](https://github.com/NotAKidOnSteam/DesktopVRIK) and [FuckToes](https://github.com/NotAKidOnSteam/FuckToes).
|
||||
* **Alternative avatar collider scale:** applies slightly different approach to avatar collider size change; default value - `true`
|
||||
* **Prevent Unity animation override:** disables overriding of animations at runtime for avatars with AAS; default value - `false`.
|
||||
* Note: This options is made for "fix" of [broken animator issues with chairs and combat worlds](https://feedback.abinteractive.net/p/gestures-getting-stuck-locally-upon-entering-vehicles-chairs).
|
||||
|
||||
Available additional parameters for AAS animator:
|
||||
* **`Upright`:** defines linear coefficient between current viewpoint height and avatar's viewpoint height; float, range - [0.0, 1.0].
|
||||
|
|
|
@ -20,7 +20,8 @@ namespace ml_amt
|
|||
DetectEmotes,
|
||||
FollowHips,
|
||||
CollisionScale,
|
||||
MassCenter
|
||||
MassCenter,
|
||||
OverrideFix
|
||||
};
|
||||
|
||||
static bool ms_ikOverrideCrouch = true;
|
||||
|
@ -35,6 +36,7 @@ namespace ml_amt
|
|||
static bool ms_followHips = true;
|
||||
static bool ms_collisionScale = true;
|
||||
static bool ms_massCenter = true;
|
||||
static bool ms_overrideFix = false;
|
||||
|
||||
static MelonLoader.MelonPreferences_Category ms_category = null;
|
||||
static List<MelonLoader.MelonPreferences_Entry> ms_entries = null;
|
||||
|
@ -51,6 +53,7 @@ namespace ml_amt
|
|||
static public event Action<bool> FollowHipsChange;
|
||||
static public event Action<bool> CollisionScaleChange;
|
||||
static public event Action<bool> MassCenterChange;
|
||||
static public event Action<bool> OverrideFixChange;
|
||||
|
||||
internal static void Init()
|
||||
{
|
||||
|
@ -69,7 +72,8 @@ namespace ml_amt
|
|||
ms_category.CreateEntry(ModSetting.DetectEmotes.ToString(), true),
|
||||
ms_category.CreateEntry(ModSetting.FollowHips.ToString(), true),
|
||||
ms_category.CreateEntry(ModSetting.CollisionScale.ToString(), true),
|
||||
ms_category.CreateEntry(ModSetting.MassCenter.ToString(), true)
|
||||
ms_category.CreateEntry(ModSetting.MassCenter.ToString(), true),
|
||||
ms_category.CreateEntry(ModSetting.OverrideFix.ToString(), false)
|
||||
};
|
||||
|
||||
Load();
|
||||
|
@ -113,6 +117,7 @@ namespace ml_amt
|
|||
ms_followHips = (bool)ms_entries[(int)ModSetting.FollowHips].BoxedValue;
|
||||
ms_collisionScale = (bool)ms_entries[(int)ModSetting.CollisionScale].BoxedValue;
|
||||
ms_massCenter = (bool)ms_entries[(int)ModSetting.MassCenter].BoxedValue;
|
||||
ms_overrideFix = (bool)ms_entries[(int)ModSetting.OverrideFix].BoxedValue;
|
||||
}
|
||||
|
||||
static void OnSliderUpdate(string p_name, string p_value)
|
||||
|
@ -213,7 +218,15 @@ namespace ml_amt
|
|||
{
|
||||
ms_massCenter = bool.Parse(p_value);
|
||||
MassCenterChange?.Invoke(ms_massCenter);
|
||||
} break;
|
||||
}
|
||||
break;
|
||||
|
||||
case ModSetting.OverrideFix:
|
||||
{
|
||||
ms_overrideFix = bool.Parse(p_value);
|
||||
OverrideFixChange?.Invoke(ms_overrideFix);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
ms_entries[(int)l_setting].BoxedValue = bool.Parse(p_value);
|
||||
|
@ -268,5 +281,9 @@ namespace ml_amt
|
|||
{
|
||||
get => ms_massCenter;
|
||||
}
|
||||
public static bool OverrideFix
|
||||
{
|
||||
get => ms_overrideFix;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -263,6 +263,13 @@ function inp_toggle_mod_amt(_obj, _callbackName) {
|
|||
<div id="CollisionScale" class ="inp_toggle no-scroll" data-current="true"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class ="row-wrapper">
|
||||
<div class ="option-caption">Prevent Unity animation override (chairs, etc.): </div>
|
||||
<div class ="option-input">
|
||||
<div id="OverrideFix" class ="inp_toggle no-scroll" data-current="false"></div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
document.getElementById('settings-ik').appendChild(l_block);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue