fix(dashboard): switching zones in the world view lets the old one go

The old zone's scenery, flairs, terrain and markers stayed until the new
zone's data came back, and a manifest still loading could land after a newer
one. Switching now clears them at once; scenery requests are aborted when
cleared, late manifests and textures of a cleared load are dropped (and
disposed), and the budget no longer counts them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-27 21:40:30 -05:00
parent ac0605b046
commit 696580cce5
2 changed files with 41 additions and 7 deletions

View File

@@ -429,6 +429,17 @@ async function loadZone(zone) {
state.follow = null;
stopReplay();
clearHeat();
// The old zone goes at once: its models, flairs, terrain and markers, and whatever of them is still loading
scenery.clear();
flairs.clear();
sceneryShown = flairsShown = null;
terrainData = null;
state.scene = null;
showTerrain();
buildObjects();
disposeGroup(layers.paths);
state.pathLines = new Map();
buildSpawns();
if (canHeat) loadHeatProperties(zone);
setStatus('Loading ' + zoneName(zone) + '…');
const [sceneData, terrain] = await Promise.all([