diff --git a/src/AcDream.Core/World/WbSceneryAdapter.cs b/src/AcDream.Core/World/WbSceneryAdapter.cs index ca73809..1a90149 100644 --- a/src/AcDream.Core/World/WbSceneryAdapter.cs +++ b/src/AcDream.Core/World/WbSceneryAdapter.cs @@ -25,6 +25,16 @@ internal static class WbSceneryAdapter /// TerrainInfo.Scenery (bits 11-15) → /// LandBlock.Height[i] /// + /// + /// No runtime length guards are needed here because + /// DatReaderWriter.DBObjs.LandBlock's default constructor + /// self-initializes both Terrain and Height to fixed-length + /// arrays of exactly 81 elements (9×9 vertices per landblock). Any caller + /// that constructs a synthetic with partial arrays + /// will receive an at the first + /// mis-sized index, which is the correct fast-fail behaviour for a + /// contract violation of this kind. + /// public static TerrainEntry[] BuildTerrainEntries(LandBlock block) { ArgumentNullException.ThrowIfNull(block);