aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorMelanie Thielker2014-10-16 03:46:45 +0200
committerMelanie Thielker2014-10-16 03:46:45 +0200
commit04612f41a77ed8c8c20ce435b36b6439e2398e9d (patch)
treef75e86d3a1e21e67b38aca1c5b713a9e982e79b9 /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
parentTouchup PgSQL XAssets adapter (diff)
downloadopensim-SC-04612f41a77ed8c8c20ce435b36b6439e2398e9d.zip
opensim-SC-04612f41a77ed8c8c20ce435b36b6439e2398e9d.tar.gz
opensim-SC-04612f41a77ed8c8c20ce435b36b6439e2398e9d.tar.bz2
opensim-SC-04612f41a77ed8c8c20ce435b36b6439e2398e9d.tar.xz
Fix transferring inventory from prims to agent inventory
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs17
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 3489873..3c120ff 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1227,16 +1227,21 @@ namespace OpenSim.Region.Framework.Scenes
1227 agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); 1227 agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move);
1228 if (taskItem.InvType == (int)InventoryType.Object) 1228 if (taskItem.InvType == (int)InventoryType.Object)
1229 { 1229 {
1230 uint perms = taskItem.CurrentPermissions; 1230 // Bake the new base permissions from folded permissions
1231 // The folded perms are in the lowest 3 bits of the current perms
1232 // We use base permissions here to avoid baking the "Locked" status
1233 // into the item as it is passed.
1234 uint perms = taskItem.BasePermissions & taskItem.NextPermissions;
1231 PermissionsUtil.ApplyFoldedPermissions(taskItem.CurrentPermissions, ref perms); 1235 PermissionsUtil.ApplyFoldedPermissions(taskItem.CurrentPermissions, ref perms);
1236 // Avoid the "lock trap" - move must always be enabled but the above may remove it
1237 // Add it back here.
1232 agentItem.BasePermissions = perms | (uint)PermissionMask.Move; 1238 agentItem.BasePermissions = perms | (uint)PermissionMask.Move;
1233 agentItem.CurrentPermissions = agentItem.BasePermissions; 1239 // Newly given items cannot be "locked" on rez. Make sure by
1234 } 1240 // setting current equal to base.
1235 else
1236 {
1237 agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions;
1238 } 1241 }
1239 1242
1243 agentItem.CurrentPermissions = agentItem.BasePermissions;
1244
1240 agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; 1245 agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
1241 agentItem.NextPermissions = taskItem.NextPermissions; 1246 agentItem.NextPermissions = taskItem.NextPermissions;
1242 agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); 1247 agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move);