Emotes custom detection

VRIK component checks for desktop mode
Disable head rotation when emote is active
This commit is contained in:
SDraw 2022-10-08 02:28:22 +03:00
parent 71c0068652
commit 4dafd9dcd7
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
9 changed files with 93 additions and 26 deletions

View file

@ -21,6 +21,7 @@ namespace ml_amt
Settings.PoseTransitionsChange += this.OnPoseTransitonsChange;
Settings.AdjustedMovementChange += this.OnAdjustedMovementChange;
Settings.IKOverrideFlyChange += this.OnIKOverrideFlyChange;
Settings.DetectEmotesChange += this.OnDetectEmotesChange;
HarmonyInstance.Patch(
typeof(PlayerSetup).GetMethod(nameof(PlayerSetup.ClearAvatar)),
@ -49,6 +50,7 @@ namespace ml_amt
m_localTweaker.SetPoseTransitions(Settings.PoseTransitions);
m_localTweaker.SetAdjustedMovement(Settings.AdjustedMovement);
m_localTweaker.SetIKOverrideFly(Settings.IKOverrideFly);
m_localTweaker.SetDetectEmotes(Settings.DetectEmotes);
}
void OnIKOverrideCrouchChange(bool p_state)
@ -86,6 +88,11 @@ namespace ml_amt
if(m_localTweaker != null)
m_localTweaker.SetIKOverrideFly(p_state);
}
void OnDetectEmotesChange(bool p_state)
{
if(m_localTweaker != null)
m_localTweaker.SetDetectEmotes(p_state);
}
static void OnAvatarClear_Postfix() => ms_instance?.OnAvatarClear();
void OnAvatarClear()