acdream/docs/research
Erik 8fa04af4c7 fix(motion): #39 candidate — un-gate UP velocity-cycle for player remotes (forward only)
Adds a player-remote velocity-fallback path to ApplyServerControlledVelocityCycle
so that when retail (the actor) toggles Shift while holding W and acdream is
the observer, the visible leg cycle switches Run↔Walk within ~200–500 ms even
though no fresh UM arrives. Static analysis (ACE GameActionMoveToState +
MovementData.cs auto-upgrade + acdream's prior diag traces) suggests retail
does NOT broadcast a fresh MoveToState on HoldKey-only changes — acdream's
UMs handle direction-key changes and our local +Acdream's transitions, but
retail-driven actors leave the cycle stuck.

Changes (all in src/AcDream.App/Rendering/GameWindow.cs):
- New RemoteMotion.LastUMTime field, stamped in OnLiveMotionUpdated
- ApplyServerControlledVelocityCycle: removed inner IsPlayerGuid gate;
  routes player remotes to new ApplyPlayerLocomotionRefinement
- ApplyPlayerLocomotionRefinement (forward-direction only):
  - 500 ms UM grace window (UMs win when fresh)
  - Forward-direction-only (low byte 0x05 / 0x07)
  - Hysteresis: Run → Walk demote at < 4.5 m/s; Walk → Run promote > 5.5 m/s
  - Skip SetCycle when neither motion ID nor speedMod changed meaningfully
  - [UPCYCLE_PLAYER] diag gated on ACDREAM_REMOTE_VEL_DIAG=1
- Outer call site in OnLivePositionUpdated un-gated (!IsPlayerGuid removed);
  per-remote routing now lives inside the function

Scope: case #1 (Run↔Walk forward) only. Cases #2–#7 (backward, sidestep
speed-buckets, direction-flips) remain deferred — PlanFromVelocity is
forward-only and its NPC-tuned thresholds (RunThreshold=1.25) do not
separate player Walk (~2.5 m/s) from player Run (~9 m/s); a TTD trace
of retail's per-direction algorithm should ground the wider fix.

ISSUES.md #39 updated with progress; investigation-prompt.md and a new
findings-static.md committed under
docs/research/2026-05-06-locomotion-cycle-transitions/ (the prompt was
authored on a parallel branch in commit 7a38da3 and is brought into this
worktree here so the next session can find it without branch-hopping).

Build clean. The 8 pre-existing test failures on this branch
(BSPStepUpTests.C3_Path6_AirborneMoverHitsSteepSlope, MotionInterpreter
WalkBackward GetMaxSpeed, etc.) are unrelated to this change — verified
by running them with the diff stashed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 06:34:20 +02:00
..
2026-05-01-retail-motion-trace fix(motion): jump direction, AutoPos cadence, backward/strafe wire & anim 2026-05-02 16:11:15 +02:00
2026-05-02-remote-entity-motion docs(spec): Phase L.3 — Remote Entity Motion Conformance design 2026-05-02 18:12:18 +02:00
2026-05-03-remote-anim-cycle docs(research): investigation prompt for remote-anim-cycle bug 2026-05-03 19:59:22 +02:00
2026-05-04-l3-port feat(motion): L.3 M1 — fresh InterpolationManager port + retail spec 2026-05-05 14:56:42 +02:00
2026-05-06-locomotion-cycle-transitions fix(motion): #39 candidate — un-gate UP velocity-cycle for player remotes (forward only) 2026-05-06 06:34:20 +02:00
data docs(research): commit named retail decomp + spells.csv (foundation) 2026-04-25 17:27:19 +02:00
decompiled research: full acclient.exe decompilation — 22,225 functions, 688K lines 2026-04-12 23:25:51 +02:00
deepdives docs+feat: 13 retail-AC deep-dives (R1-R13) + C# port scaffolds + roadmap E-H 2026-04-18 10:32:44 +02:00
named-retail docs(research): canonical retail keymap + dump-keymap tool 2026-04-25 23:01:58 +02:00
retail-ui feat(ui): Phase D.2a — VitalsPanel wired into GameWindow + backend pivot 2026-04-25 00:43:46 +02:00
2026-04-12-movement-deep-dive.md docs: movement deep dive — AC2D + holtburger cross-reference 2026-04-12 21:52:12 +02:00
2026-04-21-animation-audit.md docs(research): animation-pipeline decompile audit — no real gaps 2026-04-21 21:18:45 +02:00
2026-04-21-sky-deep-audit.md fix(sky): scale keyframe Luminosity/Transparent/MaxBright from percent → fraction 2026-04-22 17:38:44 +02:00
2026-04-22-sky-lighting-decompile.md sky(phase-1): revert speculative tint, add ACDREAM_DUMP_SKY diagnostic 2026-04-23 18:06:52 +02:00
2026-04-23-daygroup-selection.md sky(phase-3c): port retail FUN_00501990 DayGroup picker (uniform LCG) 2026-04-24 08:45:34 +02:00
2026-04-23-lightning-crossfade.md sky(phase-5a): remove DayGroup-name rain hack, ship retail-only Overcast mapping 2026-04-24 11:04:36 +02:00
2026-04-23-lightning-real.md sky(phase-8): retail-faithful night sky + README refresh 2026-04-24 20:34:36 +02:00
2026-04-23-physicsscript.md sky(phase-5a): remove DayGroup-name rain hack, ship retail-only Overcast mapping 2026-04-24 11:04:36 +02:00
2026-04-23-retail-memory-probe.md sky(phase-3g): fix LCG multiplier — 360 (DaysPerYear), not 7620 2026-04-24 10:17:38 +02:00
2026-04-23-sky-dat-schema.md sky(phase-1): revert speculative tint, add ACDREAM_DUMP_SKY diagnostic 2026-04-23 18:06:52 +02:00
2026-04-23-sky-decompile-hunt-A.md sky(phase-1): revert speculative tint, add ACDREAM_DUMP_SKY diagnostic 2026-04-23 18:06:52 +02:00
2026-04-23-sky-decompile-hunt-B.md sky(phase-8): retail-faithful night sky + README refresh 2026-04-24 20:34:36 +02:00
2026-04-23-sky-decompile-hunt-C.md sky(phase-8): retail-faithful night sky + README refresh 2026-04-24 20:34:36 +02:00
2026-04-23-sky-fog.md sky(phase-5a): remove DayGroup-name rain hack, ship retail-only Overcast mapping 2026-04-24 11:04:36 +02:00
2026-04-23-sky-material-state.md docs(sky): port plan for PhysicsScript/fog/lightning/crossfade 2026-04-24 10:53:46 +02:00
2026-04-23-sky-pes-wiring.md sky(phase-5a): remove DayGroup-name rain hack, ship retail-only Overcast mapping 2026-04-24 11:04:36 +02:00
2026-04-23-sky-references-crossref.md sky(phase-1): revert speculative tint, add ACDREAM_DUMP_SKY diagnostic 2026-04-23 18:06:52 +02:00
2026-04-23-sky-retail-verbatim.md sky(phase-1): revert speculative tint, add ACDREAM_DUMP_SKY diagnostic 2026-04-23 18:06:52 +02:00
2026-04-24-lambert-brightness-split.md sky(phase-8): retail-faithful night sky + README refresh 2026-04-24 20:34:36 +02:00
2026-04-26-chorizite-pr-draft.md docs(research): sky/weather investigation handoff + diagnostic tools 2026-04-26 21:40:34 +02:00
2026-04-26-datreaderwriter-reference.md docs(research): sky/weather investigation handoff + diagnostic tools 2026-04-26 21:40:34 +02:00
2026-04-26-sky-investigation-handoff.md docs(research): sky/weather investigation handoff + diagnostic tools 2026-04-26 21:40:34 +02:00
2026-04-28-combat-animation-planner.md feat(anim): Phase L.1c select combat maneuvers 2026-04-28 11:44:17 +02:00
2026-04-28-pes-pseudocode.md feat(vfx): Phase C.1 — PES particle renderer + post-review fixes 2026-04-28 22:47:11 +02:00
2026-04-28-remote-moveto-pseudocode.md feat(anim): Phase L.1c port MoveTo path data + per-tick steer 2026-04-28 21:49:22 +02:00
2026-04-28-sky-cloud-material-trace.md feat(vfx): Phase C.1 — PES particle renderer + post-review fixes 2026-04-28 22:47:11 +02:00
2026-04-30-precipice-slide-pseudocode.md fix(physics): #32 L.2c precipice edge-slide context 2026-04-30 08:04:37 +02:00
2026-05-05-issue-42-handoff.md docs(research): expand #42 handoff prompt for fresh-session pickup 2026-05-05 18:02:58 +02:00
acclient_animation_map.md fix(anim): implement adjust_motion — TurnLeft/SideStepLeft play backward 2026-04-13 12:17:26 +02:00
acclient_animation_pseudocode.md research: full animation pseudocode from decompiled acclient.exe 2026-04-13 12:43:44 +02:00
acclient_architecture_map.md docs: comprehensive architecture plan for acdream 2026-04-13 14:23:50 +02:00
acclient_decompiled.c research: decompile acclient.exe terrain/physics via Ghidra headless 2026-04-12 23:18:27 +02:00
acclient_function_map.md docs(research): #9 sweep acclient_function_map.md against PDB symbols 2026-04-25 17:44:07 +02:00
acclient_indoor_transitions_pseudocode.md research: indoor transition pseudocode from ACE + decompiled analysis 2026-04-13 13:56:16 +02:00
transition_pseudocode.md docs(research): collision transition system pseudocode from decompiled + ACE 2026-04-13 23:41:13 +02:00