aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs26
1 files changed, 16 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 7d801b5..e66678a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -359,7 +359,7 @@ namespace OpenSim.Region.Framework.Scenes
359 m_log.ErrorFormat( 359 m_log.ErrorFormat(
360 "[SCENEGRAPH]: Tried to add scene object {0} to {1} with illegal UUID of {2}", 360 "[SCENEGRAPH]: Tried to add scene object {0} to {1} with illegal UUID of {2}",
361 sceneObject.Name, m_parentScene.RegionInfo.RegionName, UUID.Zero); 361 sceneObject.Name, m_parentScene.RegionInfo.RegionName, UUID.Zero);
362 362
363 return false; 363 return false;
364 } 364 }
365 365
@@ -368,12 +368,12 @@ namespace OpenSim.Region.Framework.Scenes
368// m_log.DebugFormat( 368// m_log.DebugFormat(
369// "[SCENEGRAPH]: Scene graph for {0} already contains object {1} in AddSceneObject()", 369// "[SCENEGRAPH]: Scene graph for {0} already contains object {1} in AddSceneObject()",
370// m_parentScene.RegionInfo.RegionName, sceneObject.UUID); 370// m_parentScene.RegionInfo.RegionName, sceneObject.UUID);
371 371
372 return false; 372 return false;
373 } 373 }
374 374
375// m_log.DebugFormat( 375// m_log.DebugFormat(
376// "[SCENEGRAPH]: Adding scene object {0} {1}, with {2} parts on {3}", 376// "[SCENEGRAPH]: Adding scene object {0} {1}, with {2} parts on {3}",
377// sceneObject.Name, sceneObject.UUID, sceneObject.Parts.Length, m_parentScene.RegionInfo.RegionName); 377// sceneObject.Name, sceneObject.UUID, sceneObject.Parts.Length, m_parentScene.RegionInfo.RegionName);
378 378
379 SceneObjectPart[] parts = sceneObject.Parts; 379 SceneObjectPart[] parts = sceneObject.Parts;
@@ -409,7 +409,7 @@ namespace OpenSim.Region.Framework.Scenes
409 409
410 lock (SceneObjectGroupsByFullID) 410 lock (SceneObjectGroupsByFullID)
411 SceneObjectGroupsByFullID[sceneObject.UUID] = sceneObject; 411 SceneObjectGroupsByFullID[sceneObject.UUID] = sceneObject;
412 412
413 lock (SceneObjectGroupsByFullPartID) 413 lock (SceneObjectGroupsByFullPartID)
414 { 414 {
415 foreach (SceneObjectPart part in parts) 415 foreach (SceneObjectPart part in parts)
@@ -1662,6 +1662,10 @@ namespace OpenSim.Region.Framework.Scenes
1662 { 1662 {
1663 SceneObjectGroup child = children[i].ParentGroup; 1663 SceneObjectGroup child = children[i].ParentGroup;
1664 1664
1665 // Don't try and add a group to itself - this will only cause severe problems later on.
1666 if (child == parentGroup)
1667 continue;
1668
1665 // Make sure no child prim is set for sale 1669 // Make sure no child prim is set for sale
1666 // So that, on delink, no prims are unwittingly 1670 // So that, on delink, no prims are unwittingly
1667 // left for sale and sold off 1671 // left for sale and sold off
@@ -1684,11 +1688,13 @@ namespace OpenSim.Region.Framework.Scenes
1684 1688
1685 // We need to explicitly resend the newly link prim's object properties since no other actions 1689 // We need to explicitly resend the newly link prim's object properties since no other actions
1686 // occur on link to invoke this elsewhere (such as object selection) 1690 // occur on link to invoke this elsewhere (such as object selection)
1687 parentGroup.RootPart.CreateSelected = true; 1691 if (childGroups.Count > 0)
1688 parentGroup.TriggerScriptChangedEvent(Changed.LINK); 1692 {
1689 parentGroup.HasGroupChanged = true; 1693 parentGroup.RootPart.CreateSelected = true;
1690 parentGroup.ScheduleGroupForFullUpdate(); 1694 parentGroup.TriggerScriptChangedEvent(Changed.LINK);
1691 1695 parentGroup.HasGroupChanged = true;
1696 parentGroup.ScheduleGroupForFullUpdate();
1697 }
1692 } 1698 }
1693 finally 1699 finally
1694 { 1700 {