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:
parent
580ef6d468
commit
96dc8e4158
3 changed files with 62 additions and 5 deletions
|
|
@ -514,7 +514,10 @@ namespace RacesOfValheim
|
|||
private readonly FormLocomotion locomotion = new FormLocomotion();
|
||||
|
||||
private float busySince = -1f;
|
||||
private bool isAttacking = false;
|
||||
// A property so every form tells FenrirForms.LocalAttacking too: Fenrir_FormHoldStill_Patch
|
||||
// holds the player still for exactly as long as an attack clip runs.
|
||||
private bool attacking;
|
||||
private bool isAttacking { get => attacking; set { attacking = value; FenrirForms.LocalAttacking = value; } }
|
||||
|
||||
void Start()
|
||||
{
|
||||
|
|
@ -766,7 +769,10 @@ namespace RacesOfValheim
|
|||
private readonly FormLocomotion locomotion = new FormLocomotion();
|
||||
|
||||
private float busySince = -1f;
|
||||
private bool isAttacking = false;
|
||||
// A property so every form tells FenrirForms.LocalAttacking too: Fenrir_FormHoldStill_Patch
|
||||
// holds the player still for exactly as long as an attack clip runs.
|
||||
private bool attacking;
|
||||
private bool isAttacking { get => attacking; set { attacking = value; FenrirForms.LocalAttacking = value; } }
|
||||
private bool isShootingFire = false;
|
||||
private float fireTimer = 0f;
|
||||
|
||||
|
|
@ -1150,7 +1156,10 @@ namespace RacesOfValheim
|
|||
private Animator wolfAnim;
|
||||
private readonly FormLocomotion locomotion = new FormLocomotion();
|
||||
private float busySince = -1f;
|
||||
private bool isAttacking = false;
|
||||
// A property so every form tells FenrirForms.LocalAttacking too: Fenrir_FormHoldStill_Patch
|
||||
// holds the player still for exactly as long as an attack clip runs.
|
||||
private bool attacking;
|
||||
private bool isAttacking { get => attacking; set { attacking = value; FenrirForms.LocalAttacking = value; } }
|
||||
|
||||
void Start()
|
||||
{
|
||||
|
|
@ -1363,7 +1372,10 @@ namespace RacesOfValheim
|
|||
private readonly FormLocomotion locomotion = new FormLocomotion();
|
||||
|
||||
private float busySince = -1f;
|
||||
private bool isAttacking = false;
|
||||
// A property so every form tells FenrirForms.LocalAttacking too: Fenrir_FormHoldStill_Patch
|
||||
// holds the player still for exactly as long as an attack clip runs.
|
||||
private bool attacking;
|
||||
private bool isAttacking { get => attacking; set { attacking = value; FenrirForms.LocalAttacking = value; } }
|
||||
|
||||
void Start()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue