ncannasse 9 years ago
parent
commit
3741d2799f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      h3d/scene/World.hx

+ 2 - 0
h3d/scene/World.hx

@@ -131,6 +131,8 @@ class World extends Object {
 		while( chunkSize > (1 << chunkBits) )
 			chunkBits++;
 		this.chunkSize = 1 << chunkBits;
+		if( worldSize % chunkSize != 0 )
+			throw "World size must be a multiple of chunk size";
 		this.worldSize = worldSize;
 		this.worldStride = Math.ceil(worldSize / chunkSize);
 		if( autoCollect )