Browse Source

Fix ghost light remaining after deletion

trethaller 7 năm trước cách đây
mục cha
commit
eb4d65bc82
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      h3d/scene/LightSystem.hx

+ 1 - 1
h3d/scene/LightSystem.hx

@@ -62,7 +62,7 @@ class LightSystem {
 		}
 		if( lightCount <= maxLightsPerObject )
 			ctx.lights = haxe.ds.ListSort.sortSingleLinked(ctx.lights, sortLight);
-		if( shadowLight == null || shadowLight.parent == null ) {
+		if( shadowLight == null || !shadowLight.allocated) {
 			var l = ctx.lights;
 			while( l != null ) {
 				var dir = @:privateAccess l.getShadowDirection();