소스 검색

Revert "Opti heightmap checktile"

This reverts commit 639e74dfb047d6b9dea96252bfdfad1595ed4a97.
clementlandrin 3 년 전
부모
커밋
44b70faf64
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      hrt/prefab/l3d/HeightMap.hx

+ 1 - 1
hrt/prefab/l3d/HeightMap.hx

@@ -450,7 +450,7 @@ class HeightMapMesh extends h3d.scene.Object {
 
 	function checkTile( ctx : h3d.scene.RenderContext, x : Int, y : Int ) {
 		var t = hmap.getTile(x,y);
-		if( t.isEmpty() || !ctx.camera.frustum.hasBounds(t.bounds) ) {
+		if( !ctx.camera.frustum.hasBounds(t.bounds) || t.isEmpty() ) {
 			if( t.root != null ) t.root.visible = false;
 			return x >= 0 && y >= 0 && x < hmap.sizeX && y < hmap.sizeY;
 		}