acdream/tests/AcDream.Core.Tests/Physics
Erik 79fb6e7c23 fix(render): doorway blue-hole — render root clobbered by NPCs (CurrCell per-entity write)
THE doorway flap root cause, found via [flap-cam]/[shell]/[cell-transit] (2026-06-03):
the player spawned + stood still in the room (cell 0171, NO [cell-transit] after teleport),
yet the render rooted at the vestibule (0170) for all 77,951 frames — drawing only 0170's
~8-triangle shell, the rest = GL clear color = the bluish void.

CellGraph.CurrCell IS "the player's cell" (the render root), but it was written by
SetCurrAndReturn inside the PER-ENTITY ResolveWithTransition + ResolveCellId — so EVERY NPC
wrote it. A Holtburg NPC (0x000F4240) jump-looping near the doorway clobbered the player's
render root every tick. Standing still (player makes no resolve calls) the NPC's write wins
→ stuck blue void; moving, player/NPC writes fight → the flap. This is why the membership
pick fix (correct, kept) didn't change the visual — the render root was clobbered regardless.

Fix: CurrCell is now written ONLY by the player. New PhysicsEngine.UpdatePlayerCurrCell is
called from PlayerMovementController.UpdateCellId — the single player-only chokepoint for
CellId (teleport / server snap @ SetPosition + per-frame resolver). Removed the CurrCell
write from SetCurrAndReturn (inlined the 2 resolve call sites to sp.CurCellId) and the 4
ResolveCellId sites. NPCs no longer touch the render root. Teleport→UpdateCellId also covers
spawn/standing-still (CurrCell = the player's spawn cell immediately).

CellGraphMembershipTests rewritten to the new contract (3 tests): UpdatePlayerCurrCell writes
the render root; ResolveCellId does NOT (the blue-hole guard); stale-beats-null preserved.
Full Core suite: 1295 pass / 5 fail = the documented §10 baseline, zero new breakage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 10:12:38 +02:00
..
A6P7DispatchRulesTests.cs fix(phys): A6.P7 — retail-binary cyl-vs-BSP dispatch (HAS_PHYSICS_BSP_PS gate) 2026-05-25 16:35:32 +02:00
AnimationCommandRouterTests.cs fix(anim): Phase L.1b route motion commands 2026-04-28 10:46:22 +02:00
AnimationHookRouterTests.cs feat(anim): Phase E.1 hook router + GameWindow wiring 2026-04-18 16:30:23 +02:00
AnimationSequencerTests.cs fix(animation): close #61 + smooth stop from backward/sidestep-left/turn-left 2026-05-18 15:16:20 +02:00
BSPQueryTests.cs fix(phys): A6.P4 door — pos_hits_sphere records near-miss polygon 2026-05-25 11:05:04 +02:00
BSPStepUpFixtures.cs feat(physics): Phase L.2.1+L.2.2 — BSP step-up and rooftop landing 2026-04-29 16:16:39 +02:00
BSPStepUpTests.cs test(physics): Phase W triage — fix stale Path6/tick-gate/ComputeOffset tests (behavior changed by L.3.2/L.4/L.5) 2026-06-02 16:43:02 +02:00
CellArrayTests.cs feat(physics): Stage 1 — CellArray ordered/deduped cell collection (retail CELLARRAY) 2026-06-03 08:54:45 +02:00
CellarUpTrajectoryReplayTests.cs test: fix PhysicsResolveCapture/PhysicsDiagnostics static-leak isolation 2026-06-02 15:20:24 +02:00
CellDumpRoundTripTests.cs feat(phys): A6.P3 #98 Step 2 — cell-dump probe + roundtrip test 2026-05-23 15:16:56 +02:00
CellGraphMembershipTests.cs fix(render): doorway blue-hole — render root clobbered by NPCs (CurrCell per-entity write) 2026-06-03 10:12:38 +02:00
CellGraphPopulationTests.cs feat(core): UCG Stage 1 — populate CellGraph from CacheCellStruct + AddLandblock (inert) 2026-06-02 09:29:30 +02:00
CellPhysicsPortalWiringTests.cs feat(physics): Phase 2 — wire CellBSP + Portals into CellPhysics 2026-05-19 16:52:20 +02:00
CellSurfaceTests.cs feat(core): Phase B.3 — CellSurface (indoor floor polygon projection) 2026-04-12 09:51:22 +02:00
CellTransitAddAllOutsideCellsTests.cs fix(phys): A6.P4 door bug — AddAllOutsideCells coord convention + replay apparatus 2026-05-25 07:53:34 +02:00
CellTransitCheckBuildingTransitTests.cs refactor(physics): Phase 2 — code-review polish on BuildingPhysics commit 2026-05-19 18:01:44 +02:00
CellTransitFindCellListTests.cs feat(physics): Phase 2 — BuildingPhysics + CheckBuildingTransit 2026-05-19 17:34:38 +02:00
CellTransitFindCellSetTests.cs fix(physics): Stage 1 — verbatim ordered-CELLARRAY membership pick (the R1 flap) 2026-06-03 09:00:12 +02:00
CellTransitFindTransitCellsSphereTests.cs chore(phys): A6.P3 #98 triage — revert neg-poly + bldg-check experiments 2026-05-23 15:11:49 +02:00
CellTransitTests.cs test(phys): A6.P5 RED — BFS from indoor cell doesn't reach door outdoor cell 2026-05-25 12:51:33 +02:00
CollisionExemptionTests.cs fix(phys L.2g slice 1b): widen CollisionExemption to ETHEREAL alone 2026-05-13 18:27:06 +02:00
CollisionPrimitivesTests.cs feat(physics): port 9 collision primitives from acclient.exe (chunk_00530000.c) 2026-04-12 23:53:47 +02:00
DoorBugTrajectoryReplayTests.cs test(phys): A6.P5 RED — BFS from indoor cell doesn't reach door outdoor cell 2026-05-25 12:51:33 +02:00
DoorCollisionApparatusTests.cs diag(phys): [bsp-test] probe + grounded apparatus test + handoff 2026-05-24 19:22:45 +02:00
DoorSetupGfxObjInspectionTests.cs test(phys): A6.P4 door inside-out — locate cottage wall, identify corner-slide hypothesis 2026-05-25 08:34:52 +02:00
DoorwayMembershipReplayTests.cs test(core): commit doorway-threshold fixture for DoorwayMembershipReplayTests (portable) 2026-06-02 15:22:57 +02:00
EntityCollisionFlagsTests.cs feat(physics): live-entity collision plumbing (Commit A) 2026-04-29 13:12:56 +02:00
FindEnvCollisionsMultiCellTests.cs Reapply "feat(physics): A4 — wire CheckOtherCells into FindEnvCollisions" 2026-05-20 20:06:14 +02:00
GfxObjDumpRoundTripTests.cs feat(phys): A6.P3 #98 — GfxObj dump infrastructure (ACDREAM_DUMP_GFXOBJS) 2026-05-23 20:24:26 +02:00
IndoorContactPlaneRetentionTests.cs docs(test): A6.P3 slice 1 T5 — update stale call-chain reference in test doc 2026-05-22 09:37:52 +02:00
IndoorWalkablePlaneTests.cs Revert "fix(physics): remove per-frame indoor walkable-plane synthesis" 2026-05-20 09:17:24 +02:00
InterpolationManagerTests.cs feat(motion): L.3 M1 — fresh InterpolationManager port + retail spec 2026-05-05 14:56:42 +02:00
Issue98CellarUpReplayTests.cs test(phys): A6.P3 #98 Step 3 — deterministic replay harness 2026-05-23 15:25:40 +02:00
MotionCommandResolverTests.cs fix(anim): Phase L.1b route motion commands 2026-04-28 10:46:22 +02:00
MotionInterpreterTests.cs test(physics): Phase W triage — fix stale GetMaxSpeed tests; file #104 (particle cell-clip deferral) 2026-06-02 16:37:49 +02:00
PhysicsBodyTests.cs feat(core): port decompiled AC client physics — CollisionPrimitives + PhysicsBody 2026-04-12 23:54:51 +02:00
PhysicsDataCachePhantomSourceTests.cs docs(test): #101 — sync stale GameWindow.cs line ref in test class doc 2026-05-25 19:56:35 +02:00
PhysicsDiagnosticsTests.cs feat(core): Phase W Stage 0 — [cell-swept] diagnostic (swept vs static cell, no behavior change) 2026-06-02 14:08:00 +02:00
PhysicsEngineTests.cs fix(physics): Cluster A #84 + #85 — indoor cell tracking 2026-05-19 15:20:36 +02:00
PlayerWeenieTests.cs feat(physics): PlayerWeenie with retail Run/Jump formulas 2026-04-13 23:15:25 +02:00
PortalInfoTests.cs feat(physics): Phase 2 — wire CellBSP + Portals into CellPhysics 2026-05-19 16:52:20 +02:00
PortalPlaneTests.cs feat(core): Phase B.3 — PortalPlane (plane math + crossing detection) 2026-04-12 18:17:48 +02:00
PositionManagerTests.cs test(physics): Phase W triage — fix stale Path6/tick-gate/ComputeOffset tests (behavior changed by L.3.2/L.4/L.5) 2026-06-02 16:43:02 +02:00
RemoteMoveToDriverTests.cs fix(retail): rotation rate, useability gate, retail toast strings 2026-05-16 12:17:54 +02:00
ResolveCellIdTests.cs feat(physics): Phase 2 — BuildingPhysics + CheckBuildingTransit 2026-05-19 17:34:38 +02:00
ServerControlledLocomotionTests.cs fix(anim): Phase L.1c match MoveTo run speed 2026-04-28 20:58:22 +02:00
ShadowObjectRegistryMultiPartTests.cs test(phys): Task 6 regression — Deregister clears _entityShapes cache 2026-05-24 15:22:30 +02:00
ShadowObjectRegistryTests.cs feat(phys): A6.P4 slice 1 — portal-reachable cellSet includes outdoor cells 2026-05-24 08:10:32 +02:00
ShadowShapeBuilderTests.cs feat(phys): ShadowShapeBuilder.FromSetup 2026-05-24 15:12:56 +02:00
SphereIntersectsCellBspTests.cs fix(physics): #90 — sphere-overlap cell stickiness at doorway threshold 2026-05-20 20:30:36 +02:00
TerrainSurfaceTests.cs fix(scenery): #49 9×9 loop, per-spawn building check, triangle slope 2026-05-07 21:15:11 +02:00
TransitionCheckOtherCellsTests.cs chore(phys): A6.P3 #98 triage — revert neg-poly + bldg-check experiments 2026-05-23 15:11:49 +02:00
TransitionTests.cs fix(physics): Phase A8.F — viewer sweeps bypass the 30-step cap (retail-faithful) 2026-05-29 20:35:26 +02:00
TransitionTypesTests.cs Revert "fix(physics): remove per-frame indoor walkable-plane synthesis" 2026-05-20 09:17:24 +02:00
WalkMissDiagnosticTests.cs feat(physics): WalkMissDiagnostic aggregator for ISSUES #83 probe spike 2026-05-20 10:31:39 +02:00