aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs21
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs8
3 files changed, 28 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 55e7da4..c583ce7 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2548,6 +2548,11 @@ namespace OpenSim.Region.Framework.Scenes
2548 return false; 2548 return false;
2549 } 2549 }
2550 2550
2551
2552 public void updateScenePartGroup(SceneObjectPart part, SceneObjectGroup grp)
2553 {
2554 m_sceneGraph.updateScenePartGroup(part, grp);
2555 }
2551 /// <summary> 2556 /// <summary>
2552 /// Move the given scene object into a new region depending on which region its absolute position has moved 2557 /// Move the given scene object into a new region depending on which region its absolute position has moved
2553 /// into. 2558 /// into.
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 973891b..bc91961 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -462,6 +462,20 @@ namespace OpenSim.Region.Framework.Scenes
462 return true; 462 return true;
463 } 463 }
464 464
465 public void updateScenePartGroup(SceneObjectPart part, SceneObjectGroup grp)
466 {
467 // no tests, caller has responsability...
468 lock (SceneObjectGroupsByFullPartID)
469 {
470 SceneObjectGroupsByFullPartID[part.UUID] = grp;
471 }
472
473 lock (SceneObjectGroupsByLocalPartID)
474 {
475 SceneObjectGroupsByLocalPartID[part.LocalId] = grp;
476 }
477 }
478
465 /// <summary> 479 /// <summary>
466 /// Delete an object from the scene 480 /// Delete an object from the scene
467 /// </summary> 481 /// </summary>
@@ -1804,7 +1818,7 @@ namespace OpenSim.Region.Framework.Scenes
1804 List<SceneObjectGroup> childGroups = new List<SceneObjectGroup>(); 1818 List<SceneObjectGroup> childGroups = new List<SceneObjectGroup>();
1805 1819
1806 // We do this in reverse to get the link order of the prims correct 1820 // We do this in reverse to get the link order of the prims correct
1807 for (int i = 0 ; i < children.Count ; i++) 1821 for (int i = 0; i < children.Count; i++)
1808 { 1822 {
1809 SceneObjectGroup child = children[i].ParentGroup; 1823 SceneObjectGroup child = children[i].ParentGroup;
1810 1824
@@ -1815,7 +1829,7 @@ namespace OpenSim.Region.Framework.Scenes
1815 // Make sure no child prim is set for sale 1829 // Make sure no child prim is set for sale
1816 // So that, on delink, no prims are unwittingly 1830 // So that, on delink, no prims are unwittingly
1817 // left for sale and sold off 1831 // left for sale and sold off
1818 1832
1819 if (child != null) 1833 if (child != null)
1820 { 1834 {
1821 child.RootPart.ObjectSaleType = 0; 1835 child.RootPart.ObjectSaleType = 0;
@@ -1850,12 +1864,13 @@ namespace OpenSim.Region.Framework.Scenes
1850 } 1864 }
1851 finally 1865 finally
1852 { 1866 {
1867/*
1853 lock (SceneObjectGroupsByLocalPartID) 1868 lock (SceneObjectGroupsByLocalPartID)
1854 { 1869 {
1855 foreach (SceneObjectPart part in parentGroup.Parts) 1870 foreach (SceneObjectPart part in parentGroup.Parts)
1856 SceneObjectGroupsByLocalPartID[part.LocalId] = parentGroup; 1871 SceneObjectGroupsByLocalPartID[part.LocalId] = parentGroup;
1857 } 1872 }
1858 1873*/
1859 parentGroup.AdjustChildPrimPermissions(); 1874 parentGroup.AdjustChildPrimPermissions();
1860 parentGroup.HasGroupChanged = true; 1875 parentGroup.HasGroupChanged = true;
1861 parentGroup.ProcessBackup(m_parentScene.SimulationDataService, true); 1876 parentGroup.ProcessBackup(m_parentScene.SimulationDataService, true);
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 15349e3..b939b58 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -2560,11 +2560,8 @@ namespace OpenSim.Region.Framework.Scenes
2560 /// <param name="cGroupID"></param> 2560 /// <param name="cGroupID"></param>
2561 public SceneObjectPart CopyPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed) 2561 public SceneObjectPart CopyPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed)
2562 { 2562 {
2563 // give new ID to the new part, letting old keep original
2564 // SceneObjectPart newPart = part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, m_parts.Count, userExposed);
2565 SceneObjectPart newPart = part.Copy(part.LocalId, OwnerID, GroupID, m_parts.Count, userExposed); 2563 SceneObjectPart newPart = part.Copy(part.LocalId, OwnerID, GroupID, m_parts.Count, userExposed);
2566 newPart.LocalId = m_scene.AllocateLocalId(); 2564 newPart.LocalId = m_scene.AllocateLocalId();
2567 newPart.SetParent(this);
2568 2565
2569 AddPart(newPart); 2566 AddPart(newPart);
2570 2567
@@ -2977,6 +2974,8 @@ namespace OpenSim.Region.Framework.Scenes
2977 m_parts.Add(linkPart.UUID, linkPart); 2974 m_parts.Add(linkPart.UUID, linkPart);
2978 2975
2979 linkPart.SetParent(this); 2976 linkPart.SetParent(this);
2977 m_scene.updateScenePartGroup(linkPart, this);
2978
2980 linkPart.CreateSelected = true; 2979 linkPart.CreateSelected = true;
2981 2980
2982 // let physics know preserve part volume dtc messy since UpdatePrimFlags doesn't look to parent changes for now 2981 // let physics know preserve part volume dtc messy since UpdatePrimFlags doesn't look to parent changes for now
@@ -3238,9 +3237,12 @@ namespace OpenSim.Region.Framework.Scenes
3238 part.SetParent(this); 3237 part.SetParent(this);
3239 part.ParentID = m_rootPart.LocalId; 3238 part.ParentID = m_rootPart.LocalId;
3240 m_parts.Add(part.UUID, part); 3239 m_parts.Add(part.UUID, part);
3240
3241 3241
3242 part.LinkNum = linkNum; 3242 part.LinkNum = linkNum;
3243 3243
3244 m_scene.updateScenePartGroup(part, this);
3245
3244 // Compute the new position of this SOP relative to the group position 3246 // Compute the new position of this SOP relative to the group position
3245 part.OffsetPosition = newPos - AbsolutePosition; 3247 part.OffsetPosition = newPos - AbsolutePosition;
3246 3248