acdream/tests/AcDream.Core.Tests/Streaming
Erik 2561918a70 fix(G.3): pin dungeon collapse to the cell's landblock, not the position-derived one (#133)
"The dungeon is broken" — the collapse was unloading the REAL dungeon. A dungeon's
EnvCells sit at arbitrary "ocean" world coords with negative cell-local Y (snap
showed pos=(58.9,-69.6) in cell 0x00070133), so the observer landblock
_liveCenterY + floor(pp.Y/192) = 7 + floor(-69.6/192) = 7 + (-1) = 6 lands one row
off. The collapse pinned to 0x0006 and unloaded 0x0007 — the real dungeon — which
nulled CurrCell (the cell no longer existed) and left the player floating in
outdoor-lit empty space (lb 1/1 @ ~1585 fps, but the wrong landblock). This is the
Bug-A negative-local-coordinate class.

Fix: when inside a dungeon, pin the collapse to the cell's OWN landblock
(CurrCell.Id >> 16), never the position-derived observer landblock — the cell id is
the authoritative landblock for ocean-placed dungeon geometry.

Also hardened the hysteresis so a transient CurrCell flicker can't thrash:
- Re-collapse when insideDungeon at a DIFFERENT landblock (multi-landblock dungeon).
- Expand only on a DISTANT move (Chebyshev > 1) — a real exit teleports far from the
  ocean-grid block; the off-by-one flicker is always an ADJACENT (±1) landblock, so
  it now HOLDS the collapse instead of expanding.
- SweepCollapsed always preserves _collapsedCenter (the true dungeon landblock),
  never the per-frame observer landblock.

Build green; 59 streaming tests green (flicker regression test updated to the
realistic adjacent off-by-one).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 22:51:50 +02:00
..
GpuWorldStateActivatorTests.cs feat(vfx #C.1.5b): GpuWorldState fires activator for dat-hydrated entities 2026-05-12 00:07:38 +02:00
GpuWorldStateTests.cs fix(app): Phase A.1 — pending-spawn list in GpuWorldState (proper fix) 2026-04-11 23:19:40 +02:00
GpuWorldStateTwoTierTests.cs feat(render): Phase A8 — indoor visibility + streaming fixes batch 2026-05-29 10:14:50 +02:00
LandblockStreamerTests.cs feat(render): Phase A8 — indoor visibility + streaming fixes batch 2026-05-29 10:14:50 +02:00
StreamingControllerDungeonGateTests.cs fix(G.3): pin dungeon collapse to the cell's landblock, not the position-derived one (#133) 2026-06-13 22:51:50 +02:00
StreamingControllerTests.cs feat(A.5 T13): StreamingController two-tier Tick 2026-05-10 07:56:57 +02:00
StreamingControllerTwoTierTests.cs feat(render): Phase A8 — indoor visibility + streaming fixes batch 2026-05-29 10:14:50 +02:00
StreamingRegionTests.cs feat(A.5 T4): StreamingRegion ComputeFirstTickDiff 2026-05-09 22:34:55 +02:00
StreamingRegionTwoTierTests.cs fix(A.5 T4-T6): bootstrap guard + dead enum + test cleanups 2026-05-09 22:49:35 +02:00