]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/mainframe.cpp
fix cloning (don't clone the worldspam)
[xonotic/netradiant.git] / radiant / mainframe.cpp
index 05d9e52ec00256551a42b4d2b5c30823d344d439..7f7eb061f4b4be77ac2088b33c03dc19cff41fee 100644 (file)
@@ -1196,6 +1196,11 @@ public:
     if(path.size() == 1)
       return true;
 
+    // ignore worldspawn, but keep checking children
+    NodeSmartReference me(path.top().get());
+    if(me == Map_FindOrInsertWorldspawn(g_map))
+           return true;
+
     if(!path.top().get().isRoot())
     {
       Selectable* selectable = Instance_getSelectable(instance);
@@ -1213,6 +1218,11 @@ public:
     if(path.size() == 1)
       return;
 
+    // ignore worldspawn, but keep checking children
+    NodeSmartReference me(path.top().get());
+    if(me == Map_FindOrInsertWorldspawn(g_map))
+           return;
+
     if(!path.top().get().isRoot())
     {
       Selectable* selectable = Instance_getSelectable(instance);