fix cloning (don't clone the worldspam)

This commit is contained in:
Rudolf Polzer
2010-09-04 13:52:03 +02:00
parent 4d1e944aca
commit 5f44865ec2
2 changed files with 17 additions and 1 deletions

View 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
{