diff options
author | Melanie Thielker | 2014-10-16 03:46:45 +0200 |
---|---|---|
committer | Justin Clark-Casey | 2014-10-16 20:18:16 +0100 |
commit | 8fb0dccffaa2fd3a5a216a93e92844aaa4473f40 (patch) | |
tree | 7180ad9642bc47780ce92d6a03c707c8132c5a08 /OpenSim | |
parent | Change 0.8-post-fixes branch back to Post_Fixes flavour (diff) | |
download | opensim-SC_OLD-8fb0dccffaa2fd3a5a216a93e92844aaa4473f40.zip opensim-SC_OLD-8fb0dccffaa2fd3a5a216a93e92844aaa4473f40.tar.gz opensim-SC_OLD-8fb0dccffaa2fd3a5a216a93e92844aaa4473f40.tar.bz2 opensim-SC_OLD-8fb0dccffaa2fd3a5a216a93e92844aaa4473f40.tar.xz |
Fix transferring inventory from prims to agent inventory
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 17 |
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 542d454..f07de9c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1226,16 +1226,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
1226 | agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); | 1226 | agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); |
1227 | if (taskItem.InvType == (int)InventoryType.Object) | 1227 | if (taskItem.InvType == (int)InventoryType.Object) |
1228 | { | 1228 | { |
1229 | uint perms = taskItem.CurrentPermissions; | 1229 | // Bake the new base permissions from folded permissions |
1230 | // The folded perms are in the lowest 3 bits of the current perms | ||
1231 | // We use base permissions here to avoid baking the "Locked" status | ||
1232 | // into the item as it is passed. | ||
1233 | uint perms = taskItem.BasePermissions & taskItem.NextPermissions; | ||
1230 | PermissionsUtil.ApplyFoldedPermissions(taskItem.CurrentPermissions, ref perms); | 1234 | PermissionsUtil.ApplyFoldedPermissions(taskItem.CurrentPermissions, ref perms); |
1235 | // Avoid the "lock trap" - move must always be enabled but the above may remove it | ||
1236 | // Add it back here. | ||
1231 | agentItem.BasePermissions = perms | (uint)PermissionMask.Move; | 1237 | agentItem.BasePermissions = perms | (uint)PermissionMask.Move; |
1232 | agentItem.CurrentPermissions = agentItem.BasePermissions; | 1238 | // Newly given items cannot be "locked" on rez. Make sure by |
1233 | } | 1239 | // setting current equal to base. |
1234 | else | ||
1235 | { | ||
1236 | agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions; | ||
1237 | } | 1240 | } |
1238 | 1241 | ||
1242 | agentItem.CurrentPermissions = agentItem.BasePermissions; | ||
1243 | |||
1239 | agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; | 1244 | agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; |
1240 | agentItem.NextPermissions = taskItem.NextPermissions; | 1245 | agentItem.NextPermissions = taskItem.NextPermissions; |
1241 | agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); | 1246 | agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); |