disable TerrainMapData cache for SAB path

This commit is contained in:
scamiv
2025-11-26 21:53:49 +01:00
parent 9892537a08
commit 2d63dcfcc5
+4 -2
View File
@@ -107,8 +107,10 @@ export async function loadTerrainMap(
: undefined,
sharedDirtyBuffer: undefined, // populated by consumer when needed
};
// Always cache the result, but only use cache when appropriate
loadedMaps.set(map, result);
// Only cache the result when caching is actually used (non-SAB path)
if (shouldUseCache) {
loadedMaps.set(map, result);
}
return result;
}