acdream/src/AcDream.Core/Physics
Erik 4cbfe0a5f8 fix(physics): L.2.3h — skip Placement in step-down contact-recovery branch
Live-test bug: player getting "super stuck" near walls without touching
them. Diagnostic showed 0 step-up calls, so the issue wasn't in DoStepUp.

Root cause: my subagent's L.2.1 commit added a Placement validation
inside DoStepDown to prevent step-up-through-walls. That check is right
for DoStepUp's call (the original use case). But DoStepDown is ALSO
called from TransitionalInsert's contact-recovery branch when the per-
sub-step contact plane is briefly lost (e.g., right after a wall-slide
nudges the sphere slightly upward).

For that "maintain contact during normal movement" use, the Placement
check is over-strict. Wall-slide can leave the sphere with sub-EPSILON
overlap of the wall's BSP solid; SphereIntersectsSolid returns Collided
inside Placement; DoStepDown returns false; my L.2.3e then escalates
that to TransitionState.Collided in the outer loop; ValidateTransition
reverts the position to CurPos every frame. Result: player stuck near
the wall without ever touching it.

Fix: add a `bool runPlacement = true` parameter to DoStepDown.
- DoStepUp passes the default (Placement runs — protects step-up).
- TransitionalInsert's contact-recovery branch passes false (Placement
  skipped — accepts whatever walkable surface is found within reach).

This preserves L.2.3e's edge-block (genuine edges return Collided
because no walkable is found, not because Placement rejected) while
unbreaking normal-walking-near-walls.

ACE Transition.cs:731-741 runs Placement unconditionally, but ACE's
pre-step-down state machine is cleaner — acdream's residual wall-slide
artifacts make Placement misfire here.

Test count 825/825 still pass. Build clean.

Live verification needed: walk near a wall, should no longer get stuck.
Walk off a tall (>1.5m) balcony, should still edge-block.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 19:13:56 +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 fix(physics): L.2.3d/e/f — wall slide, edge block, step-up diagnostic 2026-04-29 17:56:22 +02:00
CellSurface.cs feat(core): Phase B.3 — CellSurface (indoor floor polygon projection) 2026-04-12 09:51:22 +02:00
CollisionExemption.cs feat(physics): retail PvP exemption + viewer/creature/missile gates (Commit C) 2026-04-29 13:21:36 +02:00
CollisionPrimitives.cs feat(physics): port 9 collision primitives from acclient.exe (chunk_00530000.c) 2026-04-12 23:53:47 +02:00
EntityCollisionFlags.cs feat(physics): live-entity collision plumbing (Commit A) 2026-04-29 13:12:56 +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 test(physics): conformance fixtures for BSP step-up + roof-landing (Phase L.2.0) 2026-04-29 15:44:16 +02:00
PhysicsEngine.cs feat(physics): retail PvP exemption + viewer/creature/missile gates (Commit C) 2026-04-29 13:21:36 +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(physics): live-entity collision plumbing (Commit A) 2026-04-29 13:12:56 +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): L.2.3h — skip Placement in step-down contact-recovery branch 2026-04-29 19:13:56 +02:00