aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs2
-rwxr-xr-xOpenSim/Region/Framework/Scenes/SceneGraph.cs27
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs11
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs24
5 files changed, 29 insertions, 36 deletions
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
index 2a7bfb0..4542bbf 100644
--- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
+++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
@@ -146,6 +146,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
146 child.TriggerScriptChangedEvent(Changed.OWNER); 146 child.TriggerScriptChangedEvent(Changed.OWNER);
147 child.ApplyNextOwnerPermissions(); 147 child.ApplyNextOwnerPermissions();
148 } 148 }
149 group.AggregatePerms();
149 } 150 }
150 151
151 part.ObjectSaleType = 0; 152 part.ObjectSaleType = 0;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index c1faf21..ea100ae 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -2766,8 +2766,6 @@ namespace OpenSim.Region.Framework.Scenes
2766 child.Inventory.ChangeInventoryOwner(groupID); 2766 child.Inventory.ChangeInventoryOwner(groupID);
2767 child.TriggerScriptChangedEvent(Changed.OWNER); 2767 child.TriggerScriptChangedEvent(Changed.OWNER);
2768 } 2768 }
2769
2770
2771 } 2769 }
2772 } 2770 }
2773 2771
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 602ac4b..dad8cac 100755
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -2101,20 +2101,23 @@ namespace OpenSim.Region.Framework.Scenes
2101 SceneObjectGroup copy = original.Copy(true); 2101 SceneObjectGroup copy = original.Copy(true);
2102 copy.AbsolutePosition = copy.AbsolutePosition + offset; 2102 copy.AbsolutePosition = copy.AbsolutePosition + offset;
2103 2103
2104 SceneObjectPart[] parts = copy.Parts;
2105
2106 m_numTotalPrim += parts.Length;
2107
2104 if (original.OwnerID != AgentID) 2108 if (original.OwnerID != AgentID)
2105 { 2109 {
2106 copy.SetOwner(AgentID, GroupID); 2110 copy.SetOwner(AgentID, GroupID);
2107 2111
2108 SceneObjectPart[] partList = copy.Parts;
2109
2110 if (m_parentScene.Permissions.PropagatePermissions()) 2112 if (m_parentScene.Permissions.PropagatePermissions())
2111 { 2113 {
2112 foreach (SceneObjectPart child in partList) 2114 foreach (SceneObjectPart child in parts)
2113 { 2115 {
2114 child.Inventory.ChangeInventoryOwner(AgentID); 2116 child.Inventory.ChangeInventoryOwner(AgentID);
2115 child.TriggerScriptChangedEvent(Changed.OWNER); 2117 child.TriggerScriptChangedEvent(Changed.OWNER);
2116 child.ApplyNextOwnerPermissions(); 2118 child.ApplyNextOwnerPermissions();
2117 } 2119 }
2120 copy.AggregatePerms();
2118 } 2121 }
2119 } 2122 }
2120 2123
@@ -2124,10 +2127,6 @@ namespace OpenSim.Region.Framework.Scenes
2124 lock (SceneObjectGroupsByFullID) 2127 lock (SceneObjectGroupsByFullID)
2125 SceneObjectGroupsByFullID[copy.UUID] = copy; 2128 SceneObjectGroupsByFullID[copy.UUID] = copy;
2126 2129
2127 SceneObjectPart[] parts = copy.Parts;
2128
2129 m_numTotalPrim += parts.Length;
2130
2131 foreach (SceneObjectPart part in parts) 2130 foreach (SceneObjectPart part in parts)
2132 { 2131 {
2133 if (part.GetPrimType() == PrimType.SCULPT) 2132 if (part.GetPrimType() == PrimType.SCULPT)
@@ -2150,21 +2149,17 @@ namespace OpenSim.Region.Framework.Scenes
2150 // think it's selected, so it will never send a deselect... 2149 // think it's selected, so it will never send a deselect...
2151 copy.IsSelected = false; 2150 copy.IsSelected = false;
2152 2151
2153 m_numPrim += copy.Parts.Length;
2154
2155 if (rot != Quaternion.Identity) 2152 if (rot != Quaternion.Identity)
2156 {
2157 copy.UpdateGroupRotationR(rot); 2153 copy.UpdateGroupRotationR(rot);
2158 } 2154
2155 // required for physics to update it's position
2156 copy.ResetChildPrimPhysicsPositions();
2159 2157
2160 copy.CreateScriptInstances(0, false, m_parentScene.DefaultScriptEngine, 1); 2158 copy.CreateScriptInstances(0, false, m_parentScene.DefaultScriptEngine, 1);
2161 copy.HasGroupChanged = true;
2162 copy.ScheduleGroupForFullUpdate();
2163 copy.ResumeScripts(); 2159 copy.ResumeScripts();
2164 2160
2165 // required for physics to update it's position 2161 copy.HasGroupChanged = true;
2166 copy.AbsolutePosition = copy.AbsolutePosition; 2162 copy.ScheduleGroupForFullUpdate();
2167
2168 return copy; 2163 return copy;
2169 } 2164 }
2170 } 2165 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 87ce0b7..0817144 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -5243,17 +5243,13 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
5243 5243
5244 if (OwnerID != item.Owner) 5244 if (OwnerID != item.Owner)
5245 { 5245 {
5246 //LogPermissions("Before ApplyNextOwnerPermissions");
5247
5248 if (scene.Permissions.PropagatePermissions())
5249 ApplyNextOwnerPermissions();
5250
5251 //LogPermissions("After ApplyNextOwnerPermissions");
5252
5253 if(OwnerID != GroupID) 5246 if(OwnerID != GroupID)
5254 LastOwnerID = OwnerID; 5247 LastOwnerID = OwnerID;
5255 OwnerID = item.Owner; 5248 OwnerID = item.Owner;
5256 Inventory.ChangeInventoryOwner(item.Owner); 5249 Inventory.ChangeInventoryOwner(item.Owner);
5250
5251 if (scene.Permissions.PropagatePermissions())
5252 ApplyNextOwnerPermissions();
5257 } 5253 }
5258 } 5254 }
5259 5255
@@ -5277,6 +5273,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
5277 GroupMask = 0; // Giving an object zaps group permissions 5273 GroupMask = 0; // Giving an object zaps group permissions
5278 5274
5279 Inventory.ApplyNextOwnerPermissions(); 5275 Inventory.ApplyNextOwnerPermissions();
5276 AggregateInnerPerms();
5280 } 5277 }
5281 5278
5282 public void UpdateLookAt() 5279 public void UpdateLookAt()
diff --git a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
index 1d5e4fb..2bb48ad 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
@@ -134,11 +134,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
134 private int llAttachToAvatarTemp(UUID host, UUID script, int attachmentPoint) 134 private int llAttachToAvatarTemp(UUID host, UUID script, int attachmentPoint)
135 { 135 {
136 SceneObjectPart hostPart = m_scene.GetSceneObjectPart(host); 136 SceneObjectPart hostPart = m_scene.GetSceneObjectPart(host);
137
138 if (hostPart == null) 137 if (hostPart == null)
139 return 0; 138 return 0;
140 139
141 if (hostPart.ParentGroup.IsAttachment) 140 SceneObjectGroup hostgroup = hostPart.ParentGroup;
141
142 if (hostgroup== null || hostgroup.IsAttachment)
142 return 0; 143 return 0;
143 144
144 IAttachmentsModule attachmentsModule = m_scene.RequestModuleInterface<IAttachmentsModule>(); 145 IAttachmentsModule attachmentsModule = m_scene.RequestModuleInterface<IAttachmentsModule>();
@@ -156,31 +157,32 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
156 if (!m_scene.TryGetScenePresence(item.PermsGranter, out target)) 157 if (!m_scene.TryGetScenePresence(item.PermsGranter, out target))
157 return 0; 158 return 0;
158 159
159 if (target.UUID != hostPart.ParentGroup.OwnerID) 160 if (target.UUID != hostgroup.OwnerID)
160 { 161 {
161 uint effectivePerms = hostPart.ParentGroup.GetEffectivePermissions(); 162 uint effectivePerms = hostgroup.GetEffectivePermissions();
162 163
163 if ((effectivePerms & (uint)PermissionMask.Transfer) == 0) 164 if ((effectivePerms & (uint)PermissionMask.Transfer) == 0)
164 return 0; 165 return 0;
165 166
166 hostPart.ParentGroup.SetOwner(target.UUID, target.ControllingClient.ActiveGroupId); 167 hostgroup.SetOwner(target.UUID, target.ControllingClient.ActiveGroupId);
167 168
168 if (m_scene.Permissions.PropagatePermissions()) 169 if (m_scene.Permissions.PropagatePermissions())
169 { 170 {
170 foreach (SceneObjectPart child in hostPart.ParentGroup.Parts) 171 foreach (SceneObjectPart child in hostgroup.Parts)
171 { 172 {
172 child.Inventory.ChangeInventoryOwner(target.UUID); 173 child.Inventory.ChangeInventoryOwner(target.UUID);
173 child.TriggerScriptChangedEvent(Changed.OWNER); 174 child.TriggerScriptChangedEvent(Changed.OWNER);
174 child.ApplyNextOwnerPermissions(); 175 child.ApplyNextOwnerPermissions();
175 } 176 }
177 hostgroup.AggregatePerms();
176 } 178 }
177 179
178 hostPart.ParentGroup.RootPart.ObjectSaleType = 0; 180 hostgroup.RootPart.ObjectSaleType = 0;
179 hostPart.ParentGroup.RootPart.SalePrice = 10; 181 hostgroup.RootPart.SalePrice = 10;
180 182
181 hostPart.ParentGroup.HasGroupChanged = true; 183 hostgroup.HasGroupChanged = true;
182 hostPart.ParentGroup.RootPart.SendPropertiesToClient(target.ControllingClient); 184 hostgroup.RootPart.SendPropertiesToClient(target.ControllingClient);
183 hostPart.ParentGroup.RootPart.ScheduleFullUpdate(); 185 hostgroup.RootPart.ScheduleFullUpdate();
184 } 186 }
185 187
186 return attachmentsModule.AttachObject(target, hostPart.ParentGroup, (uint)attachmentPoint, false, false, true) ? 1 : 0; 188 return attachmentsModule.AttachObject(target, hostPart.ParentGroup, (uint)attachmentPoint, false, false, true) ? 1 : 0;