aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorUbitUmarov2017-01-16 20:27:39 +0000
committerUbitUmarov2017-01-16 20:27:39 +0000
commit180add745cea4a7e076afd1cfe1c922df1bf7e0b (patch)
treeda9d65ee4918e3cd43acd19c99eb26e3afb764e3 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
parent fix EffectiveGroupOrEveryOnePerms C&T == 0 case (diff)
downloadopensim-SC_OLD-180add745cea4a7e076afd1cfe1c922df1bf7e0b.zip
opensim-SC_OLD-180add745cea4a7e076afd1cfe1c922df1bf7e0b.tar.gz
opensim-SC_OLD-180add745cea4a7e076afd1cfe1c922df1bf7e0b.tar.bz2
opensim-SC_OLD-180add745cea4a7e076afd1cfe1c922df1bf7e0b.tar.xz
replace calls to SetOwnerId and SetRootPartOwner by a single new SetOwner() so owner is not changed twice on rootpart
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs24
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>