mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-27 15:07:14 +00:00
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:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user