diff options
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 81ef54f..dfcbc4c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1851,6 +1851,28 @@ namespace OpenSim.Region.Framework.Scenes | |||
1851 | SceneObjectGroup copy = original.Copy(AgentID, GroupID, true); | 1851 | SceneObjectGroup copy = original.Copy(AgentID, GroupID, true); |
1852 | copy.AbsolutePosition = copy.AbsolutePosition + offset; | 1852 | copy.AbsolutePosition = copy.AbsolutePosition + offset; |
1853 | 1853 | ||
1854 | if (copy.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 |