Browse Source

Fixed ragdoll bounding box not updating.

Lasse Öörni 13 năm trước cách đây
mục cha
commit
7331120bac
1 tập tin đã thay đổi với 4 bổ sung5 xóa
  1. 4 5
      Engine/Graphics/Drawable.cpp

+ 4 - 5
Engine/Graphics/Drawable.cpp

@@ -328,13 +328,12 @@ void Drawable::OnNodeSet(Node* node)
 
 void Drawable::OnMarkedDirty(Node* node)
 {
+    worldBoundingBoxDirty_ = true;
+    if (octant_ && !reinsertionQueued_)
+        octant_->GetRoot()->QueueReinsertion(this);
+    
     if (node == node_)
-    {
-        worldBoundingBoxDirty_ = true;
         zone_.Reset();
-        if (octant_ && !reinsertionQueued_)
-            octant_->GetRoot()->QueueReinsertion(this);
-    }
 }
 
 void Drawable::AddToOctree()