浏览代码

only garbage invisible chunks

ncannasse 8 年之前
父节点
当前提交
784a762d2a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      h3d/scene/World.hx

+ 1 - 1
h3d/scene/World.hx

@@ -142,7 +142,7 @@ class World extends Object {
 	public function garbage() {
 		var last : WorldChunk = null;
 		for( c in allChunks )
-			if( c.initialized && (last == null || c.lastFrame < last.lastFrame) )
+			if( c.initialized && !c.root.visible && (last == null || c.lastFrame < last.lastFrame) )
 				last = c;
 		if( last != null )
 			cleanChunk(last);