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.cs24
1 files changed, 23 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 81ef54f..a36800b 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1848,9 +1848,31 @@ namespace OpenSim.Region.Framework.Scenes
1848 { 1848 {
1849 if (m_parentScene.Permissions.CanDuplicateObject(original.Children.Count, original.UUID, AgentID, original.AbsolutePosition)) 1849 if (m_parentScene.Permissions.CanDuplicateObject(original.Children.Count, original.UUID, AgentID, original.AbsolutePosition))
1850 { 1850 {
1851 SceneObjectGroup copy = original.Copy(AgentID, GroupID, true); 1851 SceneObjectGroup copy = original.Copy(true);
1852 copy.AbsolutePosition = copy.AbsolutePosition + offset; 1852 copy.AbsolutePosition = copy.AbsolutePosition + offset;
1853 1853
1854 if (original.OwnerID != AgentID)
1855 {
1856 copy.SetOwnerId(AgentID);
1857 copy.SetRootPartOwner(copy.RootPart, AgentID, GroupID);
1858
1859 List<SceneObjectPart> partList =
1860 new List<SceneObjectPart>(copy.Children.Values);
1861
1862 if (m_parentScene.Permissions.PropagatePermissions())
1863 {
1864 foreach (SceneObjectPart child in partList)
1865 {
1866 child.Inventory.ChangeInventoryOwner(AgentID);
1867 child.TriggerScriptChangedEvent(Changed.OWNER);
1868 child.ApplyNextOwnerPermissions();
1869 }
1870 }
1871
1872 copy.RootPart.ObjectSaleType = 0;
1873 copy.RootPart.SalePrice = 10;
1874 }
1875
1854 Entities.Add(copy); 1876 Entities.Add(copy);
1855 1877
1856 // Since we copy from a source group that is in selected 1878 // Since we copy from a source group that is in selected