Remove the last instance of the legacy slam but being set
New objects now get only the real slam bit.melanie
parent
e475e65828
commit
568614af2c
|
@ -67,6 +67,14 @@ namespace OpenSim.Framework
|
|||
FoldedModify = 1 << 1,
|
||||
FoldedCopy = 1 << 2,
|
||||
FoldedExport = 1 << 3,
|
||||
|
||||
// DO NOT USE THIS FOR NEW WORK. IT IS DEPRECATED AND
|
||||
// EXISTS ONLY TO REACT TO EXISTING OBJECTS HAVING IT.
|
||||
// NEW CODE SHOULD NEVER SET THIS BIT!
|
||||
// Use InventoryItemFlags.ObjectSlamPerm in the Flags field of
|
||||
// this legacy slam bit. It comes from prior incomplete
|
||||
// understanding of the code and the prohibition on
|
||||
// reading viewer code that used to be in place.
|
||||
Slam = (1 << 4),
|
||||
|
||||
FoldedMask = 0x0f,
|
||||
|
|
|
@ -608,7 +608,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
|
||||
// item.BasePermissions = perms & so.RootPart.NextOwnerMask;
|
||||
|
||||
uint nextp = so.RootPart.NextOwnerMask | 0x0f;
|
||||
uint nextp = so.RootPart.NextOwnerMask | (uint)PermissionMask.FoldedMask;
|
||||
item.BasePermissions = perms & nextp;
|
||||
item.CurrentPermissions = item.BasePermissions;
|
||||
item.NextPermissions = perms & so.RootPart.NextOwnerMask;
|
||||
|
@ -616,7 +616,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
item.GroupPermissions = so.RootPart.GroupMask & so.RootPart.NextOwnerMask;
|
||||
|
||||
// apply next owner perms on rez
|
||||
item.CurrentPermissions |= (uint)PermissionMask.Slam;
|
||||
item.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1258,6 +1258,10 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
agentItem.InvType = taskItem.InvType;
|
||||
agentItem.Flags = taskItem.Flags;
|
||||
|
||||
// The code below isn't OK. It doesn't account for flags being changed
|
||||
// in the object inventory, so it will break when you do it. That
|
||||
// is the previous behaviour, so no matter at this moment. However, there is a lot
|
||||
// TODO: Fix this after the inventory fixer exists and has beenr run
|
||||
if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions())
|
||||
{
|
||||
agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move);
|
||||
|
@ -1266,7 +1270,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
else
|
||||
agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions;
|
||||
|
||||
agentItem.CurrentPermissions = agentItem.BasePermissions;
|
||||
agentItem.BasePermissions = agentItem.CurrentPermissions;
|
||||
|
||||
agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
|
||||
agentItem.Flags &= ~(uint)(InventoryItemFlags.ObjectOverwriteBase | InventoryItemFlags.ObjectOverwriteOwner | InventoryItemFlags.ObjectOverwriteGroup | InventoryItemFlags.ObjectOverwriteEveryone | InventoryItemFlags.ObjectOverwriteNextOwner);
|
||||
|
|
|
@ -943,8 +943,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
group.SetGroup(m_part.GroupID, null);
|
||||
|
||||
// TODO: Remove magic number badness
|
||||
if ((rootPart.OwnerID != item.OwnerID) || (item.CurrentPermissions & 16) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) // Magic number
|
||||
if ((rootPart.OwnerID != item.OwnerID) || (item.CurrentPermissions & (uint)PermissionMask.Slam) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0)
|
||||
{
|
||||
if (m_part.ParentGroup.Scene.Permissions.PropagatePermissions())
|
||||
{
|
||||
|
@ -964,8 +963,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
foreach (SceneObjectPart part in partList)
|
||||
{
|
||||
// TODO: Remove magic number badness
|
||||
if ((part.OwnerID != item.OwnerID) || (item.CurrentPermissions & 16) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) // Magic number
|
||||
if ((part.OwnerID != item.OwnerID) || (item.CurrentPermissions & (uint)PermissionMask.Slam) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0)
|
||||
{
|
||||
part.LastOwnerID = part.OwnerID;
|
||||
part.OwnerID = item.OwnerID;
|
||||
|
|
Loading…
Reference in New Issue