diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 4d1e564..924b61f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2766,6 +2766,30 @@ namespace OpenSim.Region.Framework.Scenes | |||
2766 | part.ScheduleFullUpdate(); | 2766 | part.ScheduleFullUpdate(); |
2767 | } | 2767 | } |
2768 | 2768 | ||
2769 | public void SetOwner(UUID cAgentID, UUID cGroupID) | ||
2770 | { | ||
2771 | SceneObjectPart rpart = RootPart; | ||
2772 | UUID oldowner = rpart.OwnerID; | ||
2773 | ForEachPart(delegate(SceneObjectPart part) | ||
2774 | { | ||
2775 | if(part.GroupID != part.OwnerID) | ||
2776 | part.LastOwnerID = part.OwnerID; | ||
2777 | part.OwnerID = cAgentID; | ||
2778 | part.GroupID = cGroupID; | ||
2779 | }); | ||
2780 | |||
2781 | if (oldowner != cAgentID) | ||
2782 | { | ||
2783 | // Apply Next Owner Permissions if we're not bypassing permissions | ||
2784 | if (!m_scene.Permissions.BypassPermissions()) | ||
2785 | ApplyNextOwnerPermissions(); | ||
2786 | } | ||
2787 | |||
2788 | rpart.ScheduleFullUpdate(); | ||
2789 | } | ||
2790 | |||
2791 | |||
2792 | |||
2769 | /// <summary> | 2793 | /// <summary> |
2770 | /// Make a copy of the given part. | 2794 | /// Make a copy of the given part. |
2771 | /// </summary> | 2795 | /// </summary> |