aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs30
1 files changed, 29 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 1621398..60855b2 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -363,6 +363,10 @@ namespace OpenSim.Region.Framework.Scenes
363 363
364 if (Entities.ContainsKey(sceneObject.UUID)) 364 if (Entities.ContainsKey(sceneObject.UUID))
365 return false; 365 return false;
366
367// m_log.DebugFormat(
368// "[SCENEGRAPH]: Adding scene object {0} {1}, with {2} parts on {3}",
369// sceneObject.Name, sceneObject.UUID, sceneObject.Parts.Length, m_parentScene.RegionInfo.RegionName);
366 370
367 SceneObjectPart[] children = sceneObject.Parts; 371 SceneObjectPart[] children = sceneObject.Parts;
368 372
@@ -1798,7 +1802,10 @@ namespace OpenSim.Region.Framework.Scenes
1798 /// <param name="rot"></param> 1802 /// <param name="rot"></param>
1799 public SceneObjectGroup DuplicateObject(uint originalPrimID, Vector3 offset, uint flags, UUID AgentID, UUID GroupID, Quaternion rot) 1803 public SceneObjectGroup DuplicateObject(uint originalPrimID, Vector3 offset, uint flags, UUID AgentID, UUID GroupID, Quaternion rot)
1800 { 1804 {
1801 //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID); 1805// m_log.DebugFormat(
1806// "[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}",
1807// originalPrimID, offset, AgentID);
1808
1802 SceneObjectGroup original = GetGroupByPrim(originalPrimID); 1809 SceneObjectGroup original = GetGroupByPrim(originalPrimID);
1803 if (original != null) 1810 if (original != null)
1804 { 1811 {
@@ -1829,7 +1836,28 @@ namespace OpenSim.Region.Framework.Scenes
1829 copy.RootPart.SalePrice = 10; 1836 copy.RootPart.SalePrice = 10;
1830 } 1837 }
1831 1838
1839 // FIXME: This section needs to be refactored so that it just calls AddSceneObject()
1832 Entities.Add(copy); 1840 Entities.Add(copy);
1841
1842 lock (SceneObjectGroupsByFullID)
1843 SceneObjectGroupsByFullID[copy.UUID] = copy;
1844
1845 SceneObjectPart[] children = copy.Parts;
1846
1847 lock (SceneObjectGroupsByFullPartID)
1848 {
1849 SceneObjectGroupsByFullPartID[copy.UUID] = copy;
1850 foreach (SceneObjectPart part in children)
1851 SceneObjectGroupsByFullPartID[part.UUID] = copy;
1852 }
1853
1854 lock (SceneObjectGroupsByLocalPartID)
1855 {
1856 SceneObjectGroupsByLocalPartID[copy.LocalId] = copy;
1857 foreach (SceneObjectPart part in children)
1858 SceneObjectGroupsByLocalPartID[copy.LocalId] = copy;
1859 }
1860 // PROBABLE END OF FIXME
1833 1861
1834 // Since we copy from a source group that is in selected 1862 // Since we copy from a source group that is in selected
1835 // state, but the copy is shown deselected in the viewer, 1863 // state, but the copy is shown deselected in the viewer,