Update scene document versions and refine terrain layer validation

This commit is contained in:
2026-05-13 00:46:55 +02:00
parent aa1bc272ab
commit ac775e7e01
2 changed files with 6 additions and 2 deletions

View File

@@ -3059,7 +3059,10 @@ function validateTerrain(
const expectedPaintWeightCount =
terrain.sampleCountX *
terrain.sampleCountZ *
getTerrainStoredPaintWeightCount(terrain.layers.length);
(terrain.layers.length >= MIN_TERRAIN_LAYER_COUNT &&
terrain.layers.length <= MAX_TERRAIN_LAYER_COUNT
? getTerrainStoredPaintWeightCount(terrain.layers.length)
: 0);
if (terrain.paintWeights.length !== expectedPaintWeightCount) {
diagnostics.push(

View File

@@ -35,7 +35,8 @@ import {
type FoliagePrototypeRegistry
} from "../foliage/foliage";
export const SCENE_DOCUMENT_VERSION = 102 as const;
export const SCENE_DOCUMENT_VERSION = 103 as const;
export const DYNAMIC_TERRAIN_LAYERS_SCENE_DOCUMENT_VERSION = 103 as const;
export const PATH_ROAD_PREVIEW_SCENE_DOCUMENT_VERSION = 102 as const;
export const PATH_TERRAIN_GLUE_SCENE_DOCUMENT_VERSION = 101 as const;
export const SPLINE_PATH_SCENE_DOCUMENT_VERSION = 100 as const;