From 2dc4cfd3e676cb8cc117e7b1a5ff2627aef6489c Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 25 May 2026 11:06:20 +0200 Subject: [PATCH] =?UTF-8?q?docs(claude):=20A6.P4=20door=20=E2=80=94=20pos?= =?UTF-8?q?=5Fhits=5Fsphere=20fix=20shipped=20status?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Records what landed in 3253d84 + what still needs visual verification. Notes that the swept-sphere framing in the handoff was wrong and the fix is a one-line ordering matching retail's actual code. Co-Authored-By: Claude Opus 4.7 (1M context) --- CLAUDE.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index ed22794..d4cba4b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -915,6 +915,36 @@ supposed to detect a new walkable polygon under the sphere and overwrite the contact plane. Retail decomp anchor: `CObjCell::find_env_collisions`. Full pickup prompt at the bottom of [`docs/research/2026-05-23-a6-p3-issue98-comparison-harness-findings.md`](docs/research/2026-05-23-a6-p3-issue98-comparison-harness-findings.md). + +**A6.P4 door bug — `pos_hits_sphere` near-miss recording shipped +2026-05-25 PM** (commit `3253d84`). Single-line ordering fix in +`BSPQuery.PosHitsSphere`: `if (hit) hitPoly = poly;` now precedes the +front-face cull, matching retail's `CPolygon::pos_hits_sphere` at +`acclient_2013_pseudo_c.txt:322974-322993` where `*arg5 = this` fires +on static-overlap BEFORE `dot(N, movement) >= 0 → return 0`. With this +ordering, Path 5's existing `if (hitPoly0 is not null)` near-miss +branch (`BSPQuery.cs:1869`) finally fires — `NegPolyHitDispatch` +sets `path.NegPolyHit`, the outer `transitional_insert` loop dispatches +via `slide_sphere`, and the sphere slides along walls it's touching +instead of squeezing through. The handoff hypothesized swept-sphere + +closest-considered-polygon tracking; reading retail showed both +`pos_hits_sphere` and `polygon_hits_sphere_slow_but_sure` are STATIC +tests using motion only for the cull — the fix is just the ordering. +3 new RED→GREEN unit tests in `BSPQueryTests.FindCollisions_Path5_*` +cover: overlap + parallel motion (RED→GREEN), overlap + away motion +(RED→GREEN), overlap + into motion (regression guard, already passed). +Zero regressions in full Core suite — with-fix failure set is a strict +subset of baseline (14 vs 17, the 14 are pre-existing static-leak +flakiness + 2 stale-capture document-the-bug tests). Issue #98 +`LiveCompare_FirstCap_FixClosesCottageFloorCap` regression test +passes. **Needs visual verification at Holtburg cottage door inside- +out off-center ~50 cm scenario** before A6.P4 is marked complete — +sphere should block at the door surface with no squeeze-through. The +"runs a bit into the door" over-penetration symptom is hypothesized +to close together with the squeeze-through (continuous near-miss +recording while approaching a wall means the sphere slides along it +substep-by-substep rather than catastrophically penetrating then +recovering), but separate investigation if the symptom persists. Original demo scenario (Holtburg Sewer end-to-end) is unreachable: sewer doesn't exist on this server, and **issue #95** (portal-graph visibility blowup) blocks any substitute dungeon. Revised M1.5 demo split into