fix(physics): restore retail step-down placement validation

This commit is contained in:
Erik 2026-07-31 13:13:09 +02:00
parent 4fbd93ecdb
commit 1fd5da67b4
4 changed files with 333 additions and 38 deletions

View file

@ -1096,9 +1096,9 @@ excerpt summaries:
guard.
`TransitionTypes.cs` now follows that order exactly. AP-3, AP-4, AD-53, and
AD-54 are retired together. The implementation deliberately preserves the
existing ordinary-tail `runPlacement: false` choice and does not alter TS-4's
Path-6 steep-polygon shortcut.
AD-54 are retired together. Slice 1B deliberately left the ordinary-tail
`runPlacement: false` choice for the following AP-5-specific slice and did not
alter TS-4's Path-6 steep-polygon shortcut. Slice 2A below closes AP-5.
`RetailEdgeResponseOrderingTests` pins every distinguishing branch: valid
steep-contact early return, the one/two-sphere probe schedule,
@ -1133,4 +1133,40 @@ graph and prepared-flat runs compare every `ResolveResult` field and every
persistent `PhysicsBody` field by raw float/double bits, including the ordered
walkable vertex payload.
## 9. Campaign P Slice 2A closeout — mandatory StepDown placement (2026-07-31)
The complete `CTransition::step_down` body at `0x0050B2A0`
(pseudo-C:272946272998) has no caller-controlled validation choice. It resets
`walk_interp` to 1, performs the transitional downward/support probe, applies
the `EdgeSlide && !StepUp` walkable-support gate, and then always:
1. saves `sphere_path.insert_type`;
2. installs `PLACEMENT_INSERT`;
3. calls `CTransition::transitional_insert(this, 1)`;
4. restores the saved insert type; and
5. returns true only for `OK_TS`.
This is the same tail for normal grounded contact maintenance, the
`edge_slide` current-position back-probe, and StepUp. The former acdream
`runPlacement: false` argument on the first two callers was therefore a real
behavioral divergence, not a caller-specific retail mode.
The historical justification for the bypass was a wall-slide candidate that
Placement rejected. The correct boundary is the Placement dispatcher, not
StepDown. Retail's BSP, sphere, and cylinder Placement branches are pure
occupancy tests and shave `PhysicsGlobals.EPSILON` from their effective reach.
The current graph and prepared-flat dispatchers already implement that rule:
an exactly tangent sphere remains valid while penetration beyond the retail
epsilon is rejected. With the response-order fixes from §8 in place, restoring
the mandatory placement tail does not reproduce the old wall stall.
`RetailStepDownPlacementTests` pins the mechanism end to end for one- and
two-sphere movers, ordinary contact maintenance, StepUp, and a supported
candidate that overlaps only during final Placement. It also compares graph
and prepared-flat Placement at exact wall tangency and beyond-epsilon overlap.
The existing multi-frame roof/edge fixtures continue to compare the complete
`ResolveResult` and persistent `PhysicsBody` state by raw bits, and the #273,
#271, #185, StepUp, transition-retry, and TS-4 controls remain unchanged. AP-5
is retired; TS-4 is intentionally untouched.
---