acdream/src/AcDream.App/Rendering
Erik cc62e1cfde fix(motion): #39 — handle backward sign + sidestep in ApplyPlayerLocomotionRefinement
User report from fix #3 visual verify (commit 2653b30):
- Forward Run↔Walk Shift toggle: WORKS now
- Strafe Shift toggle: no transition (was out of scope)
- "When I shift walk backwards, the retail char gets animated walking
  slow forward but blipping backwards" — REGRESSION

Root cause of the backward regression: ACE encodes WalkBackward as
`WalkForward` motion with NEGATIVE speedMod (MovementData.cs:115
`interpState.ForwardSpeed *= -0.65f`). My fix #1's hysteresis branches
treated lowByte 0x05 / 0x07 as "forward" and computed positive speedMod
from horizSpeed, overwriting the negative sign. Result: animation
played forward-walk while body kept moving backward (the rubber-band).

Strafe gap: sidestep (low byte 0x0F / 0x10) wasn't in fix #1's scope,
so ApplyPlayerLocomotionRefinement returned early for sidestep cycles.
Retail does the same wire-silence on Shift toggle for sidestep, so
observer-side cycle refinement must also fire for it.

Fix:
- Probe `currentSign = sign(CurrentSpeedMod)` to detect backward direction
- For sidestep (lowByte 0x0F or 0x10): keep motion ID, refine
  speedMod magnitude = horizSpeed / WalkAnimSpeed, preserve sign
- For backward (forward-class lowByte AND currentSign < 0): keep
  WalkForward motion (per ACE encoding), refine magnitude, preserve
  negative sign — no "RunBackward" motion exists, only |speedMod|
  changes between Walk-back (~0.65) and Run-back (~1.91 = runRate × 0.65)
- Forward (currentSign >= 0): existing Walk↔Run hysteresis unchanged

Build clean. Diagnostics: [UPCYCLE_PLAYER] line still prints; the
new sidestep / backward branches use the same SetCycle call so
their decisions appear in [SCFULL] / [CURRNODE] for inspection.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 08:36:22 +02:00
..
Shaders feat(vfx): Phase C.1 — PES particle renderer + post-review fixes 2026-04-28 22:47:11 +02:00
Sky refactor(sky): replace per-frame wrap-mode mutation with persistent samplers 2026-04-29 08:08:26 +02:00
BitmapFont.cs feat(ui): debug overlay + refined input controls 2026-04-17 18:45:38 +02:00
CameraController.cs feat(app): Phase B.2 — CameraController chase mode 2026-04-12 14:29:47 +02:00
CellVisibility.cs feat(render): portal-based EnvCell visibility (Step 4) 2026-04-13 22:20:52 +02:00
ChaseCamera.cs fix(camera): pin chase-camera Z to last-grounded while airborne 2026-04-26 18:23:02 +02:00
DebugLineRenderer.cs feat(ui): debug overlay + refined input controls 2026-04-17 18:45:38 +02:00
FlyCamera.cs feat(app): slow default fly speed and add Shift-boost 2026-04-11 19:19:12 +02:00
FrustumCuller.cs feat(app): Phase A.2 — FrustumCuller + FrustumPlanes (Gribb-Hartmann) 2026-04-12 08:49:17 +02:00
GameWindow.cs fix(motion): #39 — handle backward sign + sidestep in ApplyPlayerLocomotionRefinement 2026-05-06 08:36:22 +02:00
ICamera.cs feat(app): extract ICamera interface from OrbitCamera 2026-04-10 20:24:29 +02:00
InstancedMeshRenderer.cs docs(issues): #37 humanoid coat doesn't extend up to neck (env-var diagnostics committed) 2026-05-01 16:05:33 +02:00
OrbitCamera.cs feat(app): extract ICamera interface from OrbitCamera 2026-04-10 20:24:29 +02:00
ParticleRenderer.cs feat(vfx): Phase C.1 — PES particle renderer + post-review fixes 2026-04-28 22:47:11 +02:00
SamplerCache.cs refactor(sky): replace per-frame wrap-mode mutation with persistent samplers 2026-04-29 08:08:26 +02:00
SceneLightingUboBinding.cs feat(render): Phase G.1/G.2 — SceneLighting UBO + sky renderer + shader integration 2026-04-19 10:39:48 +02:00
Shader.cs feat(ui): debug overlay + refined input controls 2026-04-17 18:45:38 +02:00
StaticMeshRenderer.cs fix(app): multi-point Z sampling + never-cull player landblock 2026-04-12 21:29:54 +02:00
TerrainAtlas.cs feat(core+app): per-cell terrain texture blending (Phase 3c.4) 2026-04-11 14:02:15 +02:00
TerrainChunkRenderer.cs feat(render): Phase G.1/G.2 — SceneLighting UBO + sky renderer + shader integration 2026-04-19 10:39:48 +02:00
TerrainRenderer.cs perf(terrain): single shared VAO/VBO/EBO for all landblocks 2026-04-13 21:30:43 +02:00
TextRenderer.cs feat(ui): debug overlay + refined input controls 2026-04-17 18:45:38 +02:00
TextureCache.cs feat(vfx): Phase C.1 — PES particle renderer + post-review fixes 2026-04-28 22:47:11 +02:00