fix(fenrir): Ulv sleeps on the sit key; forms stand still to attack

Humanoid.IsSitting asks about the "sitting" animator tag, which belongs
to chairs. The sit key is an emote that Player.StartEmote writes on the
ZDO as "sit", so the Ulv never saw the player sit down. FormLocomotion
now reads the ZDO emote too, which every client sees. Of the four
forms only ulv_animator has a sleeping state.

The hidden player kept walking under the form through an attack, so a
bite slid toward whatever WASD held. Each form's isAttacking now also
sets FenrirForms.LocalAttacking, and a SetControls prefix holds the
player still while it is set, as the True Form troll does. The leaps
move the body directly and are untouched. Cleared on every revert.
This commit is contained in:
kanym 2026-10-17 19:01:03 +02:00
commit 96dc8e4158
3 changed files with 62 additions and 5 deletions

View file

@ -300,6 +300,7 @@ namespace RacesOfValheim {
player.GetSEMan().RemoveStatusEffect("SE_WolfForm".GetStableHashCode());
}
FenrirForms.LocalAttacking = false;
isTransformed = false;
isTransformingSequence = false;
activeRules = null;
@ -575,6 +576,7 @@ namespace RacesOfValheim {
Player.m_localPlayer.GetSEMan().RemoveStatusEffect("SE_CultistForm".GetStableHashCode());
Player.m_localPlayer.GetSEMan().RemoveStatusEffect("SE_WolfForm".GetStableHashCode());
FenrirForms.LocalAttacking = false;
isTransformed = false;
Player.m_localPlayer.Message(MessageHud.MessageType.Center, revertMessage ?? ModText.Get("rov_msg_fenrir_returned_human_form"));
revertMessage = null;