]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/select.cpp
fix cloning (don't clone the worldspam)
[xonotic/netradiant.git] / radiant / select.cpp
index 19af600673e0304dee73fc9f93aef9926c2e04ba..79721e9b766915d3e4810b03b27895a3b9b76781 100644 (file)
@@ -347,12 +347,18 @@ public:
   bool pre(const scene::Path& path, scene::Instance& instance) const
   {
     ++m_depth;
+
+    // ignore worldspawn
+    NodeSmartReference me(path.top().get());
+    if(me == Map_FindOrInsertWorldspawn(g_map))
+           return false;
+
     if(m_depth == 2) // entity depth
     {
       // traverse and select children if any one is selected
          if(instance.childSelected())
                Instance_setSelected(instance, true);
-      return Node_getEntity(path.top())->isContainer() && instance.childSelected();
+      return Node_getEntity(path.top())->isContainer() && instance.isSelected();
     }
     else if(m_depth == 3) // primitive depth
     {