acdream/src/AcDream.Core/Physics
Erik 34d7f4def2 fix(anim): Phase L.1c sequencer cycle fallback for missing MoveTo motion
User-observed regression on commit 37de771: monsters in combat with
another client appear as "just a torso on the ground" until they
move. User correctly identified this as a regression I introduced.

Cause traced to the SEQUENCER side, not the InterpretedState side.
AnimationSequencer.SetCycle (AnimationSequencer.cs:392-396)
unconditionally calls ClearCyclicTail() BEFORE looking up the
requested cycle in the MotionTable. If the cycle is missing
(_mtable.Cycles.TryGetValue returns false), the body is left without
ANY cyclic tail at all — and every part snaps to its setup-default
offset on the next Advance(). Most creatures' setup-defaults put
all limbs at the torso origin, so the visual collapses to "just a
torso on the ground" until a different (working) cycle arrives.

This is specifically a regression from commit 186a584 (Phase L.1c
port). Pre-fix, MoveTo packets fell through to fullMotion=Ready
(every MotionTable contains a Ready cycle). Post-fix, MoveTo packets
seed fullMotion=RunForward via PlanMoveToStart. Some combat-stance
creatures (e.g. monsters in HandCombat 0x003C) have no
(combat, RunForward) cycle in their MotionTable — they're meant to
walk in combat, with retail's apply_run_to_command upgrading
WalkForward → RunForward at the velocity layer rather than the
animation-cycle layer.

Fix: add `AnimationSequencer.HasCycle(style, motion)` query and gate
the SetCycle call site in GameWindow.OnLiveMotionUpdated behind it.
Fall back chain: requested motion → WalkForward → Ready →
no-op-don't-clear. The InterpretedState.ForwardCommand bulk-copy
(commit 37de771) is unchanged — body still gets RunForward velocity
even when the visible animation falls back to WalkForward or Ready.

Tests: 1420 → 1422.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 10:33:48 +02:00
..
AnimationCommandRouter.cs fix(anim): Phase L.1b route motion commands 2026-04-28 10:46:22 +02:00
AnimationHookRouter.cs feat(anim): Phase E.1 hook router + GameWindow wiring 2026-04-18 16:30:23 +02:00
AnimationSequencer.cs fix(anim): Phase L.1c sequencer cycle fallback for missing MoveTo motion 2026-04-29 10:33:48 +02:00
BSPQuery.cs feat(ui): debug overlay + refined input controls 2026-04-17 18:45:38 +02:00
CellSurface.cs feat(core): Phase B.3 — CellSurface (indoor floor polygon projection) 2026-04-12 09:51:22 +02:00
CollisionPrimitives.cs feat(physics): port 9 collision primitives from acclient.exe (chunk_00530000.c) 2026-04-12 23:53:47 +02:00
IAnimationHookSink.cs feat(anim): Phase E.1 hook router + GameWindow wiring 2026-04-18 16:30:23 +02:00
MotionCommandResolver.cs feat(anim): Phase L.1c select combat maneuvers 2026-04-28 11:44:17 +02:00
MotionInterpreter.cs fix(anim): Phase L.1b route motion commands 2026-04-28 10:46:22 +02:00
PhysicsBody.cs fix(physics): full retail per-frame chain for remote motion + persist ContactPlane across frames 2026-04-21 16:55:59 +02:00
PhysicsDataCache.cs feat(ui): debug overlay + refined input controls 2026-04-17 18:45:38 +02:00
PhysicsEngine.cs fix(physics): jump arc was zero — stop pre-seeding ContactPlane while airborne 2026-04-26 17:17:13 +02:00
PlayerWeenie.cs feat(physics): PlayerWeenie with retail Run/Jump formulas 2026-04-13 23:15:25 +02:00
PortalPlane.cs fix(core): Phase B.3 — add centroid + radius bounds to PortalPlane crossing test 2026-04-12 19:08:46 +02:00
RemoteMoveToDriver.cs fix(anim): Phase L.1c clamp approach velocity to prevent overshoot 2026-04-29 10:14:35 +02:00
ResolveResult.cs feat(core): Phase B.3 — PhysicsEngine (top-level collision resolver) 2026-04-12 09:54:28 +02:00
ServerControlledLocomotion.cs fix(anim): Phase L.1c match MoveTo run speed 2026-04-28 20:58:22 +02:00
ShadowObjectRegistry.cs feat(ui): debug overlay + refined input controls 2026-04-17 18:45:38 +02:00
TerrainSurface.cs fix(physics): water depth submersion + sphere-safety-push steep-slope correction 2026-04-21 20:56:46 +02:00
TransitionTypes.cs fix(physics): water depth submersion + sphere-safety-push steep-slope correction 2026-04-21 20:56:46 +02:00