chore(release): v1.4.21 - dragon form multiplayer sync, Sverm Ravager networking, dorsal spine fix

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Ferdinando 2026-09-23 11:56:09 +02:00
commit e7325e4d25
12 changed files with 303 additions and 10 deletions

View file

@ -105,6 +105,14 @@ namespace RacesOfValheim
}
}
// Read by RemoteSkadiAnimator (SkadiPatches.cs) so other clients' copy of the form actually
// plays the bite/claw/breath clip instead of just locomotion. The suffix is a running count,
// not just the trigger name, because the same attack (e.g. two bites in a row) has to look
// like a NEW event to a remote client diffing the ZDO string - an unchanged value never
// re-triggers a Unity Animator trigger parameter.
public const string AttackTriggerKey = "RacesOfValheim_SkadiAttackTrigger";
private static int attackTriggerSeq = 0;
/// <summary>
/// Animator.SetTrigger on a name the controller does not have is silently ignored by Unity,
/// so a wrong trigger looks exactly like "the animation did not play" with nothing in the
@ -120,6 +128,13 @@ namespace RacesOfValheim
if (p.type == AnimatorControllerParameterType.Trigger && p.name == trigger)
{
anim.SetTrigger(trigger);
ZNetView nview = Player.m_localPlayer?.GetComponent<ZNetView>();
if (nview != null && nview.IsValid())
{
attackTriggerSeq++;
nview.GetZDO().Set(AttackTriggerKey, trigger + "#" + attackTriggerSeq);
}
return;
}
}