Make drag copy and copy-on-ray handle friends list perms properly
parent
6cf0b8f6fe
commit
660a560d3b
|
@ -1750,6 +1750,28 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SceneObjectGroup copy = original.Copy(AgentID, GroupID, true);
|
SceneObjectGroup copy = original.Copy(AgentID, GroupID, true);
|
||||||
copy.AbsolutePosition = copy.AbsolutePosition + offset;
|
copy.AbsolutePosition = copy.AbsolutePosition + offset;
|
||||||
|
|
||||||
|
if (copy.OwnerID != AgentID)
|
||||||
|
{
|
||||||
|
copy.SetOwnerId(AgentID);
|
||||||
|
copy.SetRootPartOwner(copy.RootPart, AgentID, GroupID);
|
||||||
|
|
||||||
|
List<SceneObjectPart> partList =
|
||||||
|
new List<SceneObjectPart>(copy.Children.Values);
|
||||||
|
|
||||||
|
if (m_parentScene.Permissions.PropagatePermissions())
|
||||||
|
{
|
||||||
|
foreach (SceneObjectPart child in partList)
|
||||||
|
{
|
||||||
|
child.Inventory.ChangeInventoryOwner(AgentID);
|
||||||
|
child.TriggerScriptChangedEvent(Changed.OWNER);
|
||||||
|
child.ApplyNextOwnerPermissions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
copy.RootPart.ObjectSaleType = 0;
|
||||||
|
copy.RootPart.SalePrice = 10;
|
||||||
|
}
|
||||||
|
|
||||||
Entities.Add(copy);
|
Entities.Add(copy);
|
||||||
|
|
||||||
// Since we copy from a source group that is in selected
|
// Since we copy from a source group that is in selected
|
||||||
|
|
Loading…
Reference in New Issue