Explorar o código

only garbage invisible chunks

ncannasse %!s(int64=8) %!d(string=hai) anos
pai
achega
784a762d2a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);