浏览代码

Terrain: remove null checks failing on static platforms

trethaller 6 年之前
父节点
当前提交
796de40a0e
共有 1 个文件被更改,包括 0 次插入2 次删除
  1. 0 2
      hide/prefab/terrain/Terrain.hx

+ 0 - 2
hide/prefab/terrain/Terrain.hx

@@ -106,7 +106,6 @@ class Terrain extends Object3D {
 
 
 	public function saveHeightTextures( ctx : Context ) {
 	public function saveHeightTextures( ctx : Context ) {
 		for( tile in terrain.tiles ) {
 		for( tile in terrain.tiles ) {
-			if( tile.tileX == null || tile.tileY == null ) continue;
 			var pixels = tile.heightMap.capturePixels();
 			var pixels = tile.heightMap.capturePixels();
 			var fileName = tile.tileX + "_" + tile.tileY + "_" + "h";
 			var fileName = tile.tileX + "_" + tile.tileY + "_" + "h";
 			ctx.shared.savePrefabDat(fileName, "heightMap", name, pixels.bytes);
 			ctx.shared.savePrefabDat(fileName, "heightMap", name, pixels.bytes);
@@ -116,7 +115,6 @@ class Terrain extends Object3D {
 	public function saveWeightTextures( ctx : Context ) {
 	public function saveWeightTextures( ctx : Context ) {
 		var packedWeightsTex = new h3d.mat.Texture(terrain.weightMapResolution, terrain.weightMapResolution, [Target], RGBA);
 		var packedWeightsTex = new h3d.mat.Texture(terrain.weightMapResolution, terrain.weightMapResolution, [Target], RGBA);
 		for( tile in terrain.tiles ) {
 		for( tile in terrain.tiles ) {
-			if( tile.tileX == null || tile.tileY == null ) continue;
 			h3d.Engine.getCurrent().pushTarget(packedWeightsTex);
 			h3d.Engine.getCurrent().pushTarget(packedWeightsTex);
 			packWeight.shader.indexMap = tile.surfaceIndexMap;
 			packWeight.shader.indexMap = tile.surfaceIndexMap;
 			packWeight.shader.weightTextures = tile.surfaceWeightArray;
 			packWeight.shader.weightTextures = tile.surfaceWeightArray;