acdream/tests/AcDream.Core.Net.Tests/Messages
Erik f794832ebc fix(anim): Phase L.1c clear MoveTo state + bulk-copy ForwardCommand on overlay UMs
User-observed regression on commit d247aef: creature reaches melee
range and "just runs" instead of stopping to attack. Two independent
research subagents converged on the same root cause.

When ACE broadcasts a melee swing, it sends an mt=0 UpdateMotion with
ForwardCommand=AttackHigh1 (Action class, 0x10000062), motion_flags
=StickToObject, and a trailing 4-byte sticky-target guid — there is
NO preceding cmd=Ready. The swing UM IS the stop signal.

Retail's CMotionInterp::move_to_interpreted_state
(acclient_2013_pseudo_c.txt:305936-305992) bulk-copies forward_command
from the wire into InterpretedState UNCONDITIONALLY, regardless of
motion class. With forward_command=AttackHigh1, get_state_velocity
(:305172-305180) returns velocity.Y=0 because its gate is
RunForward||WalkForward — body stops moving forward. The animation
overlay (the swing) is appended on top of whatever cyclic tail is
active.

Acdream's overlay branch in GameWindow.OnLiveMotionUpdated routed
Action-class commands through PlayAction (animation overlay only) and
SKIPPED:
  - ServerMoveToActive flag update — stale RunForward MoveTo state
    persisted, the per-tick driver kept steering toward the prior
    Origin and calling apply_current_movement.
  - InterpretedState.ForwardCommand bulk-copy — even if the flag had
    been cleared, the body's InterpretedState.ForwardCommand stayed
    at RunForward from the prior MoveTo cycle, so
    apply_current_movement kept producing forward velocity.
  - MoveToPath capture — staleness-timeout band-aid masked this.

Fix: lift the _remoteDeadReckon state-update block out of the
substate-only `else` branch so it runs for both overlay and substate
paths. For non-MoveTo packets, write fullMotion + speedMod directly to
InterpretedState.ForwardCommand/ForwardSpeed (bypassing
ApplyMotionToInterpretedState, which is a heuristic helper that
silently no-ops for Action class — see MotionInterpreter.cs:941-970).
This matches retail's copy_movement_from
(acclient_2013_pseudo_c.txt:293301-293311) bulk-copy semantics.

Also corrected RemoteMoveToDriver arrival predicate to retail-faithful:
chase = dist <= DistanceToObject; flee = dist >= MinDistance. The
prior max(MinDistance, DistanceToObject) defensive port happened to
compute the right value for ACE's wire defaults but had wrong
semantics (would have failed for any retail config with MinDistance >
DistanceToObject).

Tests: 1414 → 1416. New parser test for the AttackHigh1 wire layout;
new driver tests for retail-faithful chase/flee arrival.

Defers: target-guid live resolution for type 6 packets (chase-lag
mitigation, symptom #3), StickToObject sticky-target guid trailing
field, full MoveToManager port (CheckProgressMade, pending_actions
queue, Sticky/StickTo, use_final_heading).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 10:02:53 +02:00
..
AllegianceRequestsTests.cs feat(allegiance): Phase H.2 AllegianceRequests + AllegianceTree model 2026-04-18 17:17:45 +02:00
AppraiseInfoParserTests.cs feat(net): AppraiseInfoParser — ArmorProfile/CreatureProfile/WeaponProfile + enchantment bitfields 2026-04-19 10:24:35 +02:00
AppraiseTests.cs feat(items): Phase F.2 ItemRepository + AppraiseRequest round-trip 2026-04-18 16:55:36 +02:00
AutonomousPositionTests.cs feat(net): Phase B.2 — MoveToState + AutonomousPosition message builders 2026-04-12 14:28:35 +02:00
CastSpellTests.cs feat(spells): Phase E.5 CastSpellRequest + Spellbook/enchantment state 2026-04-18 17:00:32 +02:00
CharacterActionsTests.cs fix(net): Phase L.1c conform combat wire events 2026-04-28 10:54:50 +02:00
CharacterEnterWorldTests.cs feat(net): acdream enters the world — CharacterList parsed + CharacterEnterWorld sent + 68 CreateObject received (Phase 4.7) 2026-04-11 15:14:31 +02:00
CharacterListTests.cs feat(net): acdream enters the world — CharacterList parsed + CharacterEnterWorld sent + 68 CreateObject received (Phase 4.7) 2026-04-11 15:14:31 +02:00
ChatTests.cs fix(chat): BuildTell wire field order + retail-style FormatEntry + suppress duplicate Channel echo 2026-04-25 20:49:02 +02:00
CombatEventTests.cs fix(net): Phase L.1c conform combat wire events 2026-04-28 10:54:50 +02:00
CreateObjectTests.cs feat(combat): Phase L.1c wire live attack input 2026-04-28 11:58:57 +02:00
DeleteObjectTests.cs fix(anim): Phase L.1c route creature actions and despawns 2026-04-28 19:21:02 +02:00
EmoteTextTests.cs feat(net): #18 holtburger inbound chat parity - EmoteText, SoulEmote, ServerMessage, PlayerKilled, WeenieError + Windows-1252 codec 2026-04-25 19:06:01 +02:00
GameActionLoginCompleteTests.cs feat(net): Phase 4.8 — send GameAction.LoginComplete after EnterWorld 2026-04-11 23:36:19 +02:00
GameEventDispatcherTests.cs feat(net): Phase F.1 GameEvent (0xF7B0) envelope dispatcher 2026-04-18 16:52:46 +02:00
InteractRequestsTests.cs feat(interact): Phase B.4 Use / UseWithTarget / TeleToLifestone outbound 2026-04-18 17:18:36 +02:00
InventoryActionsTests.cs feat(net): InventoryActions — stack merge/split + give + shortcut + poi recall 2026-04-19 10:28:35 +02:00
MoveToStateTests.cs feat(net): Phase B.2 — MoveToState + AutonomousPosition message builders 2026-04-12 14:28:35 +02:00
PlayerKilledTests.cs feat(net): #18 holtburger inbound chat parity - EmoteText, SoulEmote, ServerMessage, PlayerKilled, WeenieError + Windows-1252 codec 2026-04-25 19:06:01 +02:00
ServerMessageTests.cs feat(net): #18 holtburger inbound chat parity - EmoteText, SoulEmote, ServerMessage, PlayerKilled, WeenieError + Windows-1252 codec 2026-04-25 19:06:01 +02:00
SetTurbineChatChannelsTests.cs feat(net+chat): #19 TurbineChat (0xF7DE) codec + ChatChannelInfo + SetTurbineChatChannels parser 2026-04-25 19:44:56 +02:00
SocialActionsTests.cs feat(net): SocialActions — query / fellowship / channel / options outbound 2026-04-19 10:26:58 +02:00
SoulEmoteTests.cs feat(net): #18 holtburger inbound chat parity - EmoteText, SoulEmote, ServerMessage, PlayerKilled, WeenieError + Windows-1252 codec 2026-04-25 19:06:01 +02:00
TurbineChatTests.cs feat(net+chat): #19 TurbineChat (0xF7DE) codec + ChatChannelInfo + SetTurbineChatChannels parser 2026-04-25 19:44:56 +02:00
UpdateMotionTests.cs fix(anim): Phase L.1c clear MoveTo state + bulk-copy ForwardCommand on overlay UMs 2026-04-29 10:02:53 +02:00
UpdatePositionTests.cs feat(net): Phase 6.7 — parse UpdatePosition (0xF748) into PositionUpdated event 2026-04-11 20:37:32 +02:00