aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-03-26 02:05:53 +0000
committerJustin Clark-Casey (justincc)2011-03-26 02:05:53 +0000
commitbfd9cc44b40e64af3c7504d43a15b7e1b44070a0 (patch)
tree25776df2f787778fa42b2959430e6e4c211f638b /OpenSim/Region/Framework
parentMerge branch 'master' into primcounts (diff)
downloadopensim-SC_OLD-bfd9cc44b40e64af3c7504d43a15b7e1b44070a0.zip
opensim-SC_OLD-bfd9cc44b40e64af3c7504d43a15b7e1b44070a0.tar.gz
opensim-SC_OLD-bfd9cc44b40e64af3c7504d43a15b7e1b44070a0.tar.bz2
opensim-SC_OLD-bfd9cc44b40e64af3c7504d43a15b7e1b44070a0.tar.xz
When an object is duplicated, add the dupe to the uuid/local id indexes as well as the basic entities list.
Added a prim counts test to reinforce this - shift-copy was no incrementing prim count. This will sometime become a basic scene test. New code needs to be refactored so we just call SceneGraph.AddSceneObject(). This will happen in the near future. With this, basic owner prim counts on a single parcel appear to be working fine (with the same previous existing taint calls as used by the land management module). More work to do.
Diffstat (limited to 'OpenSim/Region/Framework')
-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,