acdream/src/AcDream.Core.Net/Messages
Erik 3be700020b fix(physics): close #77 — auto-walk honors ACE CanCharge bit; zero velocity in turn-in-place
Two related close-range bugs reported in #77 share a root in
PlayerMovementController.DriveServerAutoWalk + BeginServerAutoWalk:

1. **Walk-vs-run misclassification.** BeginServerAutoWalk decided
   `_autoWalkInitiallyRunning = (initialDist - distanceToObject) >= 1.0f`,
   forcing run at any chase past ~1.6 m. ACE's wire-level walk-vs-run
   answer is the MovementParameters CanCharge bit (0x10), which
   Creature.SetWalkRunThreshold sets when server-side player→target
   distance >= WalkRunThreshold/2 (= 7.5 m default). Retail's
   MovementParameters::get_command (decomp 0x0052aa00) gates the run
   path on CanCharge first; the inner walk_run_threshold check
   practically always walks given ACE's 15 m default. The hardcoded
   1.0 m threshold pushed run into the 3-5 m walk-range the user
   reported should walk.

2. **Velocity leak in turn-in-place phase.** When the auto-walked body
   crossed the destination, desiredYaw flipped ~180°, walkAligned
   dropped to false, and the `if (!moveForward) return true;` branch
   returned without zeroing body velocity. The body kept the prior
   frame's running velocity (RunAnimSpeed × runRate ≈ 11 m/s) and
   slid 4-5 m past the target before the turn-around rotation
   completed — the "runs and slides away, runs back, picks up"
   symptom in #77 bug B.

Changes:

- `CreateObject.ServerMotionState.CanCharge`: new bool prop reading
  bit 0x10 of MoveToParameters. Cross-ref ACE
  MovementParams.CanCharge = 0x10.
- `PlayerMovementController.BeginServerAutoWalk`: replaces the unused
  `walkRunThreshold` parameter with `bool canCharge`; sets
  `_autoWalkInitiallyRunning = canCharge`.
- `PlayerMovementController.DriveServerAutoWalk` turn-in-place branch:
  calls `_motion.DoMotion(Ready, 1.0)` and zeros body horizontal
  velocity (preserving Z for gravity). No-op for case (a) initial-turn
  with stationary body; fixes (b) overshoot recovery and (c) settling
  cases.
- `GameWindow.OnLiveMotionUpdated`: passes
  `update.MotionState.CanCharge` through; [autowalk-begin] trace
  shows `canCharge=` instead of `walkRunThresh=`.
- `GameWindow.InstallSpeculativeTurnToTarget`: predicts ACE's
  CanCharge from local distance using ACE's exact 7.5 m rule, so the
  speculative install agrees with the wire-triggered overwrite that
  arrives moments later.

Visual-verified at Holtburg 2026-05-18: walk-range NPC click walks +
fires Use, walk-range F-key pickup walks + no overshoot, far-range
(8-10 m) pickup still runs. Test baseline unchanged (8 Core pre-existing
failures, 0 net-new failures across Core/Net/UI/App suites).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 09:33:33 +02:00
..
AllegianceRequests.cs feat(allegiance): Phase H.2 AllegianceRequests + AllegianceTree model 2026-04-18 17:17:45 +02:00
AppraiseInfoParser.cs feat(net): #18 holtburger inbound chat parity - EmoteText, SoulEmote, ServerMessage, PlayerKilled, WeenieError + Windows-1252 codec 2026-04-25 19:06:01 +02:00
AppraiseRequest.cs feat(items): Phase F.2 ItemRepository + AppraiseRequest round-trip 2026-04-18 16:55:36 +02:00
AttackTargetRequest.cs fix(net): Phase L.1c conform combat wire events 2026-04-28 10:54:50 +02:00
AutonomousPosition.cs feat(net): Phase B.2 — MoveToState + AutonomousPosition message builders 2026-04-12 14:28:35 +02:00
CastSpellRequest.cs feat(spells): Phase E.5 CastSpellRequest + Spellbook/enchantment state 2026-04-18 17:00:32 +02:00
CharacterActions.cs fix(net): Phase L.1c conform combat wire events 2026-04-28 10:54:50 +02:00
CharacterEnterWorld.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
CharacterList.cs feat(net): #18 holtburger inbound chat parity - EmoteText, SoulEmote, ServerMessage, PlayerKilled, WeenieError + Windows-1252 codec 2026-04-25 19:06:01 +02:00
ChatRequests.cs fix(chat): BuildTell wire field order + retail-style FormatEntry + suppress duplicate Channel echo 2026-04-25 20:49:02 +02:00
CreateObject.cs fix(physics): close #77 — auto-walk honors ACE CanCharge bit; zero velocity in turn-in-place 2026-05-18 09:33:33 +02:00
DddInterrogationResponse.cs feat(net): Phase 4.10 — DddInterrogationResponse + correct LoginComplete trigger 2026-04-11 23:48:37 +02:00
DeleteObject.cs fix(anim): Phase L.1c route creature actions and despawns 2026-04-28 19:21:02 +02:00
EmoteText.cs feat(net): #18 holtburger inbound chat parity - EmoteText, SoulEmote, ServerMessage, PlayerKilled, WeenieError + Windows-1252 codec 2026-04-25 19:06:01 +02:00
Encodings.cs feat(net): #18 holtburger inbound chat parity - EmoteText, SoulEmote, ServerMessage, PlayerKilled, WeenieError + Windows-1252 codec 2026-04-25 19:06:01 +02:00
GameActionLoginComplete.cs feat(net): Phase 4.8 — send GameAction.LoginComplete after EnterWorld 2026-04-11 23:36:19 +02:00
GameEventDispatcher.cs feat(net): Phase F.1 GameEvent (0xF7B0) envelope dispatcher 2026-04-18 16:52:46 +02:00
GameEventEnvelope.cs feat(net): Phase F.1 GameEvent (0xF7B0) envelope dispatcher 2026-04-18 16:52:46 +02:00
GameEvents.cs fix(net): Phase L.1c conform combat wire events 2026-04-28 10:54:50 +02:00
GameEventType.cs feat(net): Phase F.1 GameEvent (0xF7B0) envelope dispatcher 2026-04-18 16:52:46 +02:00
GameMessageFragment.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
HearSpeech.cs feat(net): #18 holtburger inbound chat parity - EmoteText, SoulEmote, ServerMessage, PlayerKilled, WeenieError + Windows-1252 codec 2026-04-25 19:06:01 +02:00
InteractRequests.cs feat(B.5): InteractRequests.BuildPickUp — PutItemInContainer 0x0019 2026-05-14 15:01:24 +02:00
InventoryActions.cs feat(net): InventoryActions — stack merge/split + give + shortcut + poi recall 2026-04-19 10:28:35 +02:00
JumpAction.cs feat(movement): send jump packet to server (opcode 0xF61B) 2026-04-14 10:23:52 +02:00
MoveToState.cs fix(movement+anim+session): clothing dedup, motion wire format, jump-skill default 2026-04-18 15:01:32 +02:00
ObjDescEvent.cs feat(net): wire 0xF625 ObjDescEvent for live appearance updates 2026-05-06 10:46:14 +02:00
PickupEvent.cs fix(B.5): handle PickupEvent 0xF74A so picked-up items despawn locally 2026-05-14 16:13:16 +02:00
PlayerDescriptionParser.cs feat(net): #13 heuristic inventory locator after gameplay_options blob 2026-05-10 09:37:46 +02:00
PlayerKilled.cs feat(net): #18 holtburger inbound chat parity - EmoteText, SoulEmote, ServerMessage, PlayerKilled, WeenieError + Windows-1252 codec 2026-04-25 19:06:01 +02:00
PrivateUpdateVital.cs feat(player): #5 PlayerDescription parser — Stam/Mana via attribute block 2026-04-25 16:42:24 +02:00
ServerMessage.cs feat(net): #18 holtburger inbound chat parity - EmoteText, SoulEmote, ServerMessage, PlayerKilled, WeenieError + Windows-1252 codec 2026-04-25 19:06:01 +02:00
SetState.cs feat(phys L.2g slice 1): WorldSession dispatches SetState (0xF74B) + hex probe 2026-05-12 22:28:04 +02:00
SetTurbineChatChannels.cs feat(net+chat): #19 TurbineChat (0xF7DE) codec + ChatChannelInfo + SetTurbineChatChannels parser 2026-04-25 19:44:56 +02:00
SocialActions.cs feat(net): #18 holtburger inbound chat parity - EmoteText, SoulEmote, ServerMessage, PlayerKilled, WeenieError + Windows-1252 codec 2026-04-25 19:06:01 +02:00
SoulEmote.cs feat(net): #18 holtburger inbound chat parity - EmoteText, SoulEmote, ServerMessage, PlayerKilled, WeenieError + Windows-1252 codec 2026-04-25 19:06:01 +02:00
StringReader.cs feat(net): #18 holtburger inbound chat parity - EmoteText, SoulEmote, ServerMessage, PlayerKilled, WeenieError + Windows-1252 codec 2026-04-25 19:06:01 +02:00
TurbineChat.cs feat(net+chat): #19 TurbineChat (0xF7DE) codec + ChatChannelInfo + SetTurbineChatChannels parser 2026-04-25 19:44:56 +02:00
UpdateMotion.cs feat(anim): Phase L.1c port MoveTo path data + per-tick steer 2026-04-28 21:49:22 +02:00
UpdatePosition.cs feat(net): plumb IsGrounded through EntityPositionUpdate (L.3.2 Task 2) 2026-05-03 10:15:02 +02:00
VectorUpdate.cs fix(net): VectorUpdate parser was reading guid from opcode bytes — remote jumps invisible 2026-04-26 21:51:36 +02:00