save a few nanoseconds
parent
1ca2a7937e
commit
8498cc2f02
|
@ -1351,19 +1351,26 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if(item.InvType == (sbyte)InventoryType.Landmark)
|
if(item.InvType == (sbyte)InventoryType.Landmark)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Copy) == 0)
|
// apply current to normal permission bits
|
||||||
mask &= ~((uint)PermissionMask.FoldedCopy);
|
uint newperms = item.CurrentPermissions;
|
||||||
if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Transfer) == 0)
|
|
||||||
|
if ((newperms & (uint)PermissionMask.Copy) == 0)
|
||||||
|
mask &= ~(uint)PermissionMask.Copy;
|
||||||
|
if ((newperms & (uint)PermissionMask.Transfer) == 0)
|
||||||
|
mask &= ~(uint)PermissionMask.Transfer;
|
||||||
|
if ((newperms & (uint)PermissionMask.Export) == 0)
|
||||||
|
mask &= ~((uint)PermissionMask.Export);
|
||||||
|
|
||||||
|
// apply next owner restricted by current to folded bits
|
||||||
|
newperms &= item.NextPermissions;
|
||||||
|
|
||||||
|
if ((newperms & (uint)PermissionMask.Copy) == 0)
|
||||||
|
mask &= ~((uint)PermissionMask.FoldedCopy);
|
||||||
|
if ((newperms & (uint)PermissionMask.Transfer) == 0)
|
||||||
mask &= ~((uint)PermissionMask.FoldedTransfer);
|
mask &= ~((uint)PermissionMask.FoldedTransfer);
|
||||||
if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Export) == 0)
|
if ((newperms & (uint)PermissionMask.Export) == 0)
|
||||||
mask &= ~((uint)PermissionMask.FoldedExport);
|
mask &= ~((uint)PermissionMask.FoldedExport);
|
||||||
|
|
||||||
if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
|
|
||||||
mask &= ~(uint)PermissionMask.Copy;
|
|
||||||
if ((item.CurrentPermissions & (uint)PermissionMask.Transfer) == 0)
|
|
||||||
mask &= ~(uint)PermissionMask.Transfer;
|
|
||||||
if ((item.CurrentPermissions & (uint)PermissionMask.Export) == 0)
|
|
||||||
mask &= ~((uint)PermissionMask.Export);
|
|
||||||
}
|
}
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue