fix(G.3): collapse dungeon streaming at the snap, not after landblock finalize (#133)
The dungeon-streaming gate read SeenOutside from the render registry
(_cellVisibility.TryGetCell), which only succeeds AFTER the landblock FINALIZES —
~tens of seconds for a 205-cell dungeon. So the collapse fired late and the full
25x25 neighbor window churned in first ("~30s to stabilize at high FPS").
EnvCell extends ObjCell, which already carries SeenOutside (set from the EnvCell
dat flags at construction), so CurrCell.SeenOutside is available the moment the
player is placed (the snap). Read it directly instead of the registry. Collapse now
engages ~3s in (snap) instead of ~30s (finalize); residual is the ~24 neighbors the
bootstrap loads before the snap, which then unload. Also simplifies the predicate.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
53e22a350d
commit
7d8da99f79
1 changed files with 8 additions and 4 deletions
|
|
@ -6890,12 +6890,16 @@ public sealed class GameWindow : IDisposable
|
|||
// window otherwise pulls in ~129 unrelated ocean-grid dungeons. Building
|
||||
// interiors (cottage/inn) have SeenOutside cells, so they are NOT gated
|
||||
// and keep their surrounding terrain.
|
||||
// Mirrors the playerInsideCell computation below (CurrCell → registry
|
||||
// LoadedCell.SeenOutside): true only for a sealed indoor cell.
|
||||
// True only for a sealed indoor cell. Read the physics CurrCell's own
|
||||
// SeenOutside (ObjCell.SeenOutside, set from the EnvCell dat flags) rather
|
||||
// than the render registry: the registry lookup only succeeds AFTER the
|
||||
// landblock FINALIZES (~tens of seconds for a 205-cell dungeon), which
|
||||
// delayed the collapse and let the full 25×25 neighbor window churn in
|
||||
// first (the "~30s to stabilize" report). CurrCell.SeenOutside is set the
|
||||
// moment the player is placed, so the collapse now engages at the snap.
|
||||
bool insideDungeon = false;
|
||||
if (_physicsEngine.DataCache?.CellGraph.CurrCell is AcDream.Core.World.Cells.EnvCell pcEnv
|
||||
&& _cellVisibility.TryGetCell(pcEnv.Id, out var pcReg)
|
||||
&& pcReg is { SeenOutside: false })
|
||||
&& !pcEnv.SeenOutside)
|
||||
{
|
||||
insideDungeon = true;
|
||||
// Pin the collapse to the cell's OWN landblock (cell id high 16 bits),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue