feat(anim): motion-action-queue infrastructure + retail jump-is-physics-only note
Adds AnimationSequencer.PlayAction as the proper path for Action and
Modifier-class motions (the MotionTable.Modifiers dict, distinct from
Cycles). Action nodes are inserted before the looping cyclic tail so
they drain once and the cycle resumes naturally — leveraging the
sequencer's existing "non-looping head drains, cyclic tail wraps"
queue semantics.
What this does:
- New AnimationSequencer.PlayAction(motionCommand, speedMod=1f):
- Resolves (style<<16) | (motion&0xFFFFFF) from MotionTable.Modifiers
- Falls back to (motion&0xFFFFFF) plain key
- Silent no-op when not found (some motion tables lack these)
- Inserts AnimNodes before _firstCyclic; re-points the cursor when on
the cyclic tail so the action plays immediately
- New MotionCommand.Jump (0x2500003B) + MotionCommand.FallDown (0x10000050)
constants.
- GameWindow.UpdatePlayerAnimation fires PlayAction(Jump) on
result.JumpExtent.HasValue and PlayAction(FallDown) on JustLanded.
Key research finding: retail does NOT animate jumps.
- ACE Player.HandleActionJump explicitly clears PendingMotions and sets
IsAnimating=false during a jump (Player.cs:914-915).
- Empirical verification: the player humanoid's MotionTable only has 8
Modifier entries — all TurnRight/SideStepRight stance variants. No
Jump (0x2500003B) or FallDown (0x10000050) entries.
- Jump is a physics-only action: the character keeps whatever cycle
was active (walk/run/idle) while the physics body arcs through the
air. There is no "raise arms to jump" pose in retail.
PlayAction is still called on jump/land as a safety hatch for creature
Setups that DO carry leap animations in their Modifiers dict (drudge
jumps, monster pounces, etc.). For player humanoids it's a no-op. The
infrastructure is also ready for future emote/combat actions that
legitimately use the Modifiers dict.
470 tests pass, build clean.
This commit is contained in:
parent
3308cddda7
commit
08ea2c0af8
3 changed files with 128 additions and 0 deletions
|
|
@ -47,6 +47,17 @@ public static class MotionCommand
|
|||
public const uint SideStepLeft = 0x65000010u;
|
||||
/// <summary>0x40000008 — Fallen (lying on ground).</summary>
|
||||
public const uint Fallen = 0x40000008u;
|
||||
/// <summary>
|
||||
/// 0x2500003B — Jump (Modifier action; played via
|
||||
/// <see cref="AnimationSequencer.PlayAction"/>). NOT a SubState — it
|
||||
/// overlays the current cycle via the motion table's Modifiers dict.
|
||||
/// </summary>
|
||||
public const uint Jump = 0x2500003Bu;
|
||||
/// <summary>
|
||||
/// 0x10000050 — FallDown (Action; the landing animation played after
|
||||
/// a jump. Enqueued via <see cref="AnimationSequencer.PlayAction"/>).
|
||||
/// </summary>
|
||||
public const uint FallDown = 0x10000050u;
|
||||
/// <summary>0x10000057 — Dead.</summary>
|
||||
public const uint Dead = 0x10000057u;
|
||||
/// <summary>0x41000011 — Crouch lower bound for blocked-jump check.</summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue