aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 2d62d66..82ab4eb 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -591,17 +591,19 @@ namespace OpenSim.Region.Environment.Scenes
591 { 591 {
592 m_scene = scene; 592 m_scene = scene;
593 RegionHandle = m_scene.RegionInfo.RegionHandle; 593 RegionHandle = m_scene.RegionInfo.RegionHandle;
594 594
595 m_rootPart.ParentID = 0; 595 m_rootPart.ParentID = 0;
596 m_rootPart.LocalId = m_scene.AllocateLocalId(); 596 if (m_rootPart.LocalId==0)
597 m_rootPart.LocalId = m_scene.AllocateLocalId();
597 598
599
598 // No need to lock here since the object isn't yet in a scene 600 // No need to lock here since the object isn't yet in a scene
599 foreach (SceneObjectPart part in m_parts.Values) 601 foreach (SceneObjectPart part in m_parts.Values)
600 { 602 {
601 if (Object.ReferenceEquals(part, m_rootPart)) 603 if (Object.ReferenceEquals(part, m_rootPart))
602 continue; 604 continue;
603 605 if (part.LocalId==0)
604 part.LocalId = m_scene.AllocateLocalId(); 606 part.LocalId = m_scene.AllocateLocalId();
605 part.ParentID = m_rootPart.LocalId; 607 part.ParentID = m_rootPart.LocalId;
606 //m_log.DebugFormat("[SCENE]: Given local id {0} to part {1}, linknum {2}, parent {3} {4}", part.LocalId, part.UUID, part.LinkNum, part.ParentID, part.ParentUUID); 608 //m_log.DebugFormat("[SCENE]: Given local id {0} to part {1}, linknum {2}, parent {3} {4}", part.LocalId, part.UUID, part.LinkNum, part.ParentID, part.ParentUUID);
607 } 609 }