Fix transferring inventory from prims to agent inventory
parent
4a90dd3556
commit
8fb0dccffa
|
@ -1226,16 +1226,21 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move);
|
agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move);
|
||||||
if (taskItem.InvType == (int)InventoryType.Object)
|
if (taskItem.InvType == (int)InventoryType.Object)
|
||||||
{
|
{
|
||||||
uint perms = taskItem.CurrentPermissions;
|
// Bake the new base permissions from folded permissions
|
||||||
|
// The folded perms are in the lowest 3 bits of the current perms
|
||||||
|
// We use base permissions here to avoid baking the "Locked" status
|
||||||
|
// into the item as it is passed.
|
||||||
|
uint perms = taskItem.BasePermissions & taskItem.NextPermissions;
|
||||||
PermissionsUtil.ApplyFoldedPermissions(taskItem.CurrentPermissions, ref perms);
|
PermissionsUtil.ApplyFoldedPermissions(taskItem.CurrentPermissions, ref perms);
|
||||||
|
// Avoid the "lock trap" - move must always be enabled but the above may remove it
|
||||||
|
// Add it back here.
|
||||||
agentItem.BasePermissions = perms | (uint)PermissionMask.Move;
|
agentItem.BasePermissions = perms | (uint)PermissionMask.Move;
|
||||||
agentItem.CurrentPermissions = agentItem.BasePermissions;
|
// Newly given items cannot be "locked" on rez. Make sure by
|
||||||
}
|
// setting current equal to base.
|
||||||
else
|
|
||||||
{
|
|
||||||
agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
agentItem.CurrentPermissions = agentItem.BasePermissions;
|
||||||
|
|
||||||
agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
|
agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
|
||||||
agentItem.NextPermissions = taskItem.NextPermissions;
|
agentItem.NextPermissions = taskItem.NextPermissions;
|
||||||
agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move);
|
agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move);
|
||||||
|
|
Loading…
Reference in New Issue