acdream/tools
Erik fd1548af61 feat(phys): A6.P4 door — cdb-driven NegPolyHit dispatch (incomplete; needs BSP near-miss recording)
cdb attached to retail at a Holtburg cottage door while user walked the
inside-out off-center scenario. Three trace iterations identified that
retail's collision-recording happens via SPHEREPATH::set_neg_poly_hit
(fires hundreds of times during inside-out walk), NOT via the more
obvious-named COLLISIONINFO setters (which fire 0 times). Apparatus
scripts at tools/cdb/door-inside-out-v[1-3].cdb + symbol-probe.cdb.

Our codebase has NegPolyHitDispatch defined but never called. The
downstream TransitionalInsert NegPolyHit handler was a stub. Two-part
fix landed:

1. BSPQuery.FindCollisions Path 5 (Contact branch) restructured —
   distinguishes full hit (hit0 == true → StepSphereUp) from near-miss
   (hit0 == false but hitPoly0 != null → NegPolyHitDispatch). Mirrors
   retail BSPTREE::find_collisions at
   acclient_2013_pseudo_c.txt:0053a630-0053a6fb.

2. Transition.TransitionalInsert NegPolyHit handler — dispatches to
   step_up + step_up_slide (NegStepUp=true) or records collision
   normal + returns Collided (NegStepUp=false). Mirrors retail
   CTransition::transitional_insert at
   acclient_2013_pseudo_c.txt:0050b7af-0050b7e6.

Tests: all 11 fix-relevant + regression tests pass including issue #98.

VISUAL VERIFICATION (user-driven inside-out off-center): still squeezes
through. Diagnostic [neg-poly-dispatch] probe shows ZERO hits in
production. The Path 5 restructuring doesn't surface NegPolyHit
because our SphereIntersectsPolyInternal only sets hitPoly on FULL
hits — retail's sphere_intersects_poly sets var_5c (closest polygon)
even on near-misses via BSP-traversal side effect.

Remaining fix (next session): add near-miss polygon recording to
SphereIntersectsPolyInternal. Once it sets hitPoly on near-miss BSP
traversal, the Path 5 NegPolyHit dispatch (this commit) will fire
and the TransitionalInsert handler (this commit) will block.

Full handoff with cdb trace table + next-step plan:
docs/research/2026-05-25-door-bug-cdb-retail-trace-findings.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 10:36:22 +02:00
..
cdb feat(phys): A6.P4 door — cdb-driven NegPolyHit dispatch (incomplete; needs BSP near-miss recording) 2026-05-25 10:36:22 +02:00
cdb-scripts fix(motion): full queue reset on locomotion-cycle direct transitions 2026-05-03 17:00:55 +02:00
diag-logs diag(motion): instrumentation for remote walk↔run leg-cycle bug (Commit A) 2026-05-03 20:38:47 +02:00
dump-keymap docs(research): canonical retail keymap + dump-keymap tool 2026-04-25 23:01:58 +02:00
ghidra_project feat(core): port decompiled AC client physics — CollisionPrimitives + PhysicsBody 2026-04-12 23:54:51 +02:00
InspectCoatTex docs(issues): #37 — Investigation 2 narrows bug to SubPalette coverage gaps 2026-05-05 14:45:50 +02:00
pdb-extract feat(physics): #32 L.5 30Hz physics tick + retail debugger toolchain (#35) + Phase 3 retail-faithful kill_velocity 2026-04-30 22:41:12 +02:00
PesChainAudit docs(research): sky/weather investigation handoff + diagnostic tools 2026-04-26 21:40:34 +02:00
RainMeshProbe feat(sky): load Setup-backed (0x020xxx) sky objects via SetupMesh.Flatten 2026-04-27 23:24:09 +02:00
RetailTimeProbe sky(phase-8): retail-faithful night sky + README refresh 2026-04-24 20:34:36 +02:00
SkyObjectInspect sky(phase-8): retail-faithful night sky + README refresh 2026-04-24 20:34:36 +02:00
StarsProbe tools(probe): add StarsProbe to dump every SkyObject's geometry + UVs 2026-04-26 22:19:28 +02:00
TextureDump docs(research): sky/weather investigation handoff + diagnostic tools 2026-04-26 21:40:34 +02:00
WeatherEnumerator docs(research): sky/weather investigation handoff + diagnostic tools 2026-04-26 21:40:34 +02:00
WeatherSetupProbe docs(research): sky/weather investigation handoff + diagnostic tools 2026-04-26 21:40:34 +02:00
decompile_acclient.py research: decompile acclient.exe terrain/physics via Ghidra headless 2026-04-12 23:18:27 +02:00
decompile_full.py research: full acclient.exe decompilation — 22,225 functions, 688K lines 2026-04-12 23:25:51 +02:00
DecompileTargets.java research: decompile acclient.exe terrain/physics via Ghidra headless 2026-04-12 23:18:27 +02:00
ghidra_decompile.py research: decompile acclient.exe terrain/physics via Ghidra headless 2026-04-12 23:18:27 +02:00