acdream/src
Erik 8bacef0598 fix(phys L.2d slice 1.5): probe captures hit poly under StepSphereUp recursion
First Holtburg-doorway capture showed all 191 [resolve-bldg] entries
labeled "n/a (cylinder)" — including hits attributed to the building
0xA9B47900 which [entity-source] confirmed was registered as type=BSP.
The label was a probe bug, not a real cylinder route.

Root cause: BSPQuery's grounded-path (Path 5) returns early via
`StepSphereUp(transition, worldNormal, engine)` when no step is already
in progress. The slice-1 side-channel write at line 1546 came AFTER
that early return, so it never fired for the dominant grounded-player
case. Compounding: StepSphereUp recurses into ResolveWithTransition →
FindObjCollisions, whose per-entity `LastBspHitPoly = null` clear
wiped any earlier write before the outer attribution emitter read it.

Fix:
1. BSPQuery Path 5: move LastBspHitPoly write to the top of
   `if (hit0 || hitPoly0 != null)` blocks (both foot- and head-sphere),
   BEFORE the StepSphereUp early return. Recursion-safe — the inner
   resolve's BSP writes will overwrite with the inner entity's poly,
   but for the dominant case (same wall hit on both outer and inner)
   that's still the correct attribution.
2. TransitionTypes.FindObjCollisions: drop the per-entity clear of
   LastBspHitPoly. With BSPQuery now writing at hit-detection time
   instead of response-computation time, the side-channel value is
   reliable without per-iteration zeroing.
3. TransitionTypes [resolve-bldg] emission: key the "n/a (cylinder)"
   label on `obj.CollisionType` directly, not on LastBspHitPoly being
   null. A BSP entity with a null poly now logs "n/a (BSP path —
   side-channel not written, missing BSPQuery wire site)" so any
   future BSPQuery path that's missing the wire is visible in the
   trace rather than being silently mis-labeled.

Verified: build green, the 2 slice-1 tests still pass, 8 pre-existing
failures unchanged.

Spec: docs/superpowers/specs/2026-05-13-l2d-cbuildingobj-collision-design.md
First capture (showing the label bug): launch-l2d-slice1.log lines
12086-12120 (representative [resolve-bldg] entries for obj=0xA9B47900).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 19:25:32 +02:00
..
AcDream.App feat(phys L.2d slice 1): BSP-hit diagnostic probe + plan-of-record correction 2026-05-12 19:14:34 +02:00
AcDream.Cli feat(vfx): Phase E.3 particle system + hook wiring + registry 2026-04-18 16:48:17 +02:00
AcDream.Core fix(phys L.2d slice 1.5): probe captures hit poly under StepSphereUp recursion 2026-05-12 19:25:32 +02:00
AcDream.Core.Net feat(net): #13 register PD trailer inventory+equipped in ItemRepository 2026-05-10 09:43:46 +02:00
AcDream.Plugin.Abstractions feat(core): add IGameState, IEvents, WorldEvents with replay-on-subscribe 2026-04-10 20:29:29 +02:00
AcDream.Plugins.Smoke feat(app): wire IGameState+IEvents into Program and SmokePlugin 2026-04-10 20:31:50 +02:00
AcDream.UI.Abstractions feat(phys L.2d slice 1): BSP-hit diagnostic probe + plan-of-record correction 2026-05-12 19:14:34 +02:00
AcDream.UI.ImGui fix(ui): scope title-bar-only-drag absorber to BeginChild — Settings tabs work 2026-04-26 23:04:10 +02:00