fix #137 (seam shake): CheckOtherCells queried remaining cells at a stale pre-climb center

The P2 cellar-lip lesson one loop deeper. CheckOtherCells takes footCenter
by value and used it for every cell in the loop — but a mid-loop query can
MOVE the sphere: at the Facility Hub cell boundaries the neighbor's ramp
floor full-hits, step_sphere_up climbs the foot +0.6mm and returns OK, and
the loop continued querying the REMAINING cells (including the under-room,
portal-ring-3) at the pre-climb height — 0.4mm inside the double-faced
floor slab, grazing its underside (the under-room's ceiling) within the
near-miss window. That dispatched a neg-poly step-up with a DOWNWARD
normal, whose failure funneled into slide_sphere's opposing branch ->
synthetic reversed-movement collision -> Collided -> revert, every frame:
the seam shake (and, pre-mechanism-2-fix, the original absorbing wedge's
entry).

Retail check_other_cells reads the LIVE sphere_path.global_sphere for
every cell (each cell's find_collisions receives the transition itself,
pc:272717+). Fix: re-read footCenter = sp.GlobalSphere[0].Origin at the
top of each loop iteration.

All three Issue137CorridorSeamReplayTests repros un-skipped: the
snapshot-exact west-boundary crossing (capture tick 4101), the east
deep-straddle, and the clean-run lifecycle all GREEN. Full suites: Core
2556 / App 713 / UI 425 / Net 385, 0 failures.

Visual gate pending: corridor run + the purple seam flashing re-check
(expected to be the render exposing the same per-frame oscillation).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-07-05 19:15:05 +02:00
parent 660f3458ac
commit d4869154d2
3 changed files with 32 additions and 3 deletions

View file

@ -1804,6 +1804,21 @@ public sealed class Transition
{
if (cellId == sp.CheckCellId) continue;
// #137 seam shake (2026-07-06): a mid-loop query can MOVE the
// sphere — a Path-5 full hit dispatches step_sphere_up, and a
// successful climb lifts the foot (the 0.6 mm ramp-slab lift at
// the Facility Hub boundaries) yet returns OK, so the loop
// continues. Retail's check_other_cells reads the LIVE
// sphere_path.global_sphere for every cell (each cell's
// find_collisions receives the transition itself, pc:272717+);
// querying the remaining cells with the pre-climb center re-tests
// the boundary ~0.4 mm inside the floor slab and grazes the
// under-room's CEILING (the slab underside) — the neg-poly
// step-up-with-a-downward-normal chain that shook the player at
// every corridor seam. Same lesson as the P2 cellar-lip fix
// (RunCheckOtherCellsAndAdvance's entry refresh), one loop deeper.
footCenter = sp.GlobalSphere[0].Origin;
if ((cellId & 0xFFFFu) < 0x0100u)
{
var terrainWalkable = engine.SampleTerrainWalkable(footCenter.X, footCenter.Y);