diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 240c688..40332a6 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1747,9 +1747,31 @@ namespace OpenSim.Region.Framework.Scenes | |||
1747 | { | 1747 | { |
1748 | if (m_parentScene.Permissions.CanDuplicateObject(original.Children.Count, original.UUID, AgentID, original.AbsolutePosition)) | 1748 | if (m_parentScene.Permissions.CanDuplicateObject(original.Children.Count, original.UUID, AgentID, original.AbsolutePosition)) |
1749 | { | 1749 | { |
1750 | SceneObjectGroup copy = original.Copy(AgentID, GroupID, true); | 1750 | SceneObjectGroup copy = original.Copy(true); |
1751 | copy.AbsolutePosition = copy.AbsolutePosition + offset; | 1751 | copy.AbsolutePosition = copy.AbsolutePosition + offset; |
1752 | 1752 | ||
1753 | if (original.OwnerID != AgentID) | ||
1754 | { | ||
1755 | copy.SetOwnerId(AgentID); | ||
1756 | copy.SetRootPartOwner(copy.RootPart, AgentID, GroupID); | ||
1757 | |||
1758 | List<SceneObjectPart> partList = | ||
1759 | new List<SceneObjectPart>(copy.Children.Values); | ||
1760 | |||
1761 | if (m_parentScene.Permissions.PropagatePermissions()) | ||
1762 | { | ||
1763 | foreach (SceneObjectPart child in partList) | ||
1764 | { | ||
1765 | child.Inventory.ChangeInventoryOwner(AgentID); | ||
1766 | child.TriggerScriptChangedEvent(Changed.OWNER); | ||
1767 | child.ApplyNextOwnerPermissions(); | ||
1768 | } | ||
1769 | } | ||
1770 | |||
1771 | copy.RootPart.ObjectSaleType = 0; | ||
1772 | copy.RootPart.SalePrice = 10; | ||
1773 | } | ||
1774 | |||
1753 | Entities.Add(copy); | 1775 | Entities.Add(copy); |
1754 | 1776 | ||
1755 | // Since we copy from a source group that is in selected | 1777 | // Since we copy from a source group that is in selected |