Kaynağa Gözat

Ensure CSG parent's _make_dirty() is called when entering a tree.

Marcel Admiraal 5 yıl önce
ebeveyn
işleme
9be7b30f35
1 değiştirilmiş dosya ile 3 ekleme ve 8 silme
  1. 3 8
      modules/csg/csg_shape.cpp

+ 3 - 8
modules/csg/csg_shape.cpp

@@ -132,18 +132,13 @@ void CSGShape3D::_make_dirty() {
 		return;
 	}
 
-	if (dirty) {
-		return;
-	}
-
-	dirty = true;
-
 	if (parent) {
 		parent->_make_dirty();
-	} else {
-		//only parent will do
+	} else if (!dirty) {
 		call_deferred("_update_shape");
 	}
+
+	dirty = true;
 }
 
 CSGBrush *CSGShape3D::_get_brush() {