From 287c724b5585b87822da4ba92f8a1c55b7d33a67 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 29 Nov 2008 01:33:10 +0000 Subject: A try to better attachment crossing. --- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 8a6f06c..fabf276 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -592,7 +592,8 @@ namespace OpenSim.Region.Environment.Scenes m_scene = scene; RegionHandle = m_scene.RegionInfo.RegionHandle; - m_rootPart.ParentID = 0; + if (m_rootPart.Shape.PCode != 9 || m_rootPart.Shape.State == 0) + m_rootPart.ParentID = 0; if (m_rootPart.LocalId==0) m_rootPart.LocalId = m_scene.AllocateLocalId(); @@ -921,9 +922,10 @@ namespace OpenSim.Region.Environment.Scenes public void SetRootPart(SceneObjectPart part) { part.SetParent(this); - part.ParentID = 0; - part.LinkNum = 0; m_rootPart = part; + if (!IsAttachment) + part.ParentID = 0; + part.LinkNum = 0; // No locking required since the SOG should not be in the scene yet - one can't change root parts after // the scene object has been attached to the scene -- cgit v1.1