test(p2): faithful cellar-lip wedge reproduction + investigation apparatus (no fix yet)
P2 / M1.5 "blocked at the last step" cellar-lip wedge. This session built a faithful deterministic reproduction and peeled the cause through six evidence-disproven framings to one bounded question. NO fix landed — the last layers were each disproven by evidence, and guessing at the load-bearing collision code is the saga's failure mode. Apparatus: - CellarLipWedgeTests.cs + Fixtures/cellar-lip/ (3 real cell dumps + wedge-records.jsonl = 29 captured ACDREAM_CAPTURE_RESOLVE wedge calls). Replays the exact calls + body-before through the lip-cell engine: all 29 reproduce at 0% advance in <200 ms. Tests are documents-the-bug / diagnostics (GREEN while the wedge exists). - TEMP probes ([path5-wall]/[fw-enter]/[find-walkable] in BSPQuery; [neg-poly]/[stepsphereup]/ [stepdown-decide]/CheckOtherCells cn/sn/negHit in TransitionTypes), gated on ACDREAM_PROBE_INDOOR_BSP, marked STRIP. TransitionTypes neg-poly shortcut has a reverted-fix comment (slide attempt didn't clear the wedge). - tools/cdb/retail-*-trace.cdb (retail cdb traces). Findings (handoff: docs/research/2026-06-04-p2-cellar-lip-flatfloor-cp-handoff.md, see the "NEXT-SESSION KICKOFF" at top): - Flat-floor contact plane is retail-faithful (v1 trace, full-file correlation). NOT the bug. - PosHitsSphere cull sign is retail-faithful (cdb -z verified; the Binary Ninja `test ah,N; jp` parity-jump reads inverted — caught + reverted a wrong fix from that mis-read). - Sphere radius correct (0.48 player / 0.30 camera probe). - Retail connector cell 0xA9B40175 never blocks (CEnvCell::find_collisions trace: 0 Collided/Slid). - PINNED: during the step-up's step-down, BSPQuery.FindWalkableInternal is never called for cell 0171, so the cottage floor (poly 0x0023, Z=94) is never tested as walkable -> no contact plane -> step-up fails -> StepUpSlide=Collided -> wedge. Next: trace FindEnvCollisions -> FindCollisions path dispatch for 0171 during StepDown=true (why StepSphereDown/find_walkable is skipped), port retail, validate via CellarLipWedgeTests, regress DoorBugTrajectoryReplayTests + visual gate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
57435e912b
commit
bc1be26907
12 changed files with 5824 additions and 3 deletions
|
|
@ -1374,10 +1374,27 @@ public static class BSPQuery
|
|||
Vector3 collisionNormal,
|
||||
PhysicsEngine engine)
|
||||
{
|
||||
if (transition.DoStepUp(collisionNormal, engine!))
|
||||
bool stepped = transition.DoStepUp(collisionNormal, engine!);
|
||||
|
||||
// TEMP diagnostic (cellar-lip wedge, 2026-06-04): this is the suspected
|
||||
// recursive step-up onto the CONNECTOR cell during the outer check_other_cells
|
||||
// (StepUp/StepDown both false). Log which cell, the input normal, whether the
|
||||
// climb succeeded, and the slide fallback's result. STRIP once the wedge fix lands.
|
||||
if (PhysicsDiagnostics.ProbeIndoorBspEnabled)
|
||||
{
|
||||
var p = transition.SpherePath;
|
||||
Console.WriteLine(System.FormattableString.Invariant(
|
||||
$"[stepsphereup] cell=0x{p.CheckCellId:X8} stepUpFlag={p.StepUp} stepDownFlag={p.StepDown} n=({collisionNormal.X:F2},{collisionNormal.Y:F2},{collisionNormal.Z:F2}) stepped={stepped} pos=({p.CheckPos.X:F3},{p.CheckPos.Y:F3},{p.CheckPos.Z:F3})"));
|
||||
}
|
||||
|
||||
if (stepped)
|
||||
return TransitionState.OK;
|
||||
|
||||
return transition.SpherePath.StepUpSlide(transition);
|
||||
var slideRes = transition.SpherePath.StepUpSlide(transition);
|
||||
if (PhysicsDiagnostics.ProbeIndoorBspEnabled)
|
||||
Console.WriteLine(System.FormattableString.Invariant(
|
||||
$"[stepsphereup] cell=0x{transition.SpherePath.CheckCellId:X8} → StepUpSlide={slideRes}"));
|
||||
return slideRes;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
|
@ -1494,6 +1511,17 @@ public static class BSPQuery
|
|||
path.NegStepUp = stepUp;
|
||||
// ACE: path.LocalSpacePos.LocalToGlobalVec(hitPoly.Plane.Normal)
|
||||
path.NegCollisionNormal = Vector3.Transform(hitPoly.Plane.Normal, localToWorld);
|
||||
|
||||
// TEMP diagnostic (cellar-lip wedge, 2026-06-04): name the exact near-miss
|
||||
// polygon (id + local normal + sides) + the foot/head mapping (stepUp) + the
|
||||
// step-down flag, so we can tell which connector poly the step-up grazes.
|
||||
// Gated on ACDREAM_PROBE_INDOOR_BSP. STRIP once the wedge fix lands.
|
||||
if (PhysicsDiagnostics.ProbeIndoorBspEnabled)
|
||||
{
|
||||
var nl = hitPoly.Plane.Normal;
|
||||
Console.WriteLine(System.FormattableString.Invariant(
|
||||
$"[neg-poly] cell=0x{path.CheckCellId:X8} stepUp={stepUp} stepDownFlag={path.StepDown} poly=0x{hitPoly.Id:X4} nLocal=({nl.X:F3},{nl.Y:F3},{nl.Z:F3}) sides={hitPoly.SidesType} checkPos=({path.CheckPos.X:F3},{path.CheckPos.Y:F3},{path.CheckPos.Z:F3})"));
|
||||
}
|
||||
return TransitionState.OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue