diff options
author | UbitUmarov | 2017-01-16 20:27:39 +0000 |
---|---|---|
committer | UbitUmarov | 2017-01-16 20:27:39 +0000 |
commit | 180add745cea4a7e076afd1cfe1c922df1bf7e0b (patch) | |
tree | da9d65ee4918e3cd43acd19c99eb26e3afb764e3 /OpenSim/Region/Framework | |
parent | fix EffectiveGroupOrEveryOnePerms C&T == 0 case (diff) | |
download | opensim-SC-180add745cea4a7e076afd1cfe1c922df1bf7e0b.zip opensim-SC-180add745cea4a7e076afd1cfe1c922df1bf7e0b.tar.gz opensim-SC-180add745cea4a7e076afd1cfe1c922df1bf7e0b.tar.bz2 opensim-SC-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')
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 24 |
2 files changed, 25 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 2f65ce2..602ac4b 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -2103,8 +2103,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2103 | 2103 | ||
2104 | if (original.OwnerID != AgentID) | 2104 | if (original.OwnerID != AgentID) |
2105 | { | 2105 | { |
2106 | copy.SetOwnerId(AgentID); | 2106 | copy.SetOwner(AgentID, GroupID); |
2107 | copy.SetRootPartOwner(copy.RootPart, AgentID, GroupID); | ||
2108 | 2107 | ||
2109 | SceneObjectPart[] partList = copy.Parts; | 2108 | SceneObjectPart[] partList = copy.Parts; |
2110 | 2109 | ||
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> |