aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorUbitUmarov2017-05-01 23:07:57 +0100
committerUbitUmarov2017-05-01 23:07:57 +0100
commit8498cc2f02ef61e93d603dac28c21df4321609a1 (patch)
tree91e9899d2fbeb60bb1f92e4c272949ba88f5822f /OpenSim/Region/Framework/Scenes
parentPermissions tests: added test with 2 direct transfers with permission changes... (diff)
downloadopensim-SC-8498cc2f02ef61e93d603dac28c21df4321609a1.zip
opensim-SC-8498cc2f02ef61e93d603dac28c21df4321609a1.tar.gz
opensim-SC-8498cc2f02ef61e93d603dac28c21df4321609a1.tar.bz2
opensim-SC-8498cc2f02ef61e93d603dac28c21df4321609a1.tar.xz
save a few nanoseconds
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs25
1 files changed, 16 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 946ed09..8c9d0bb 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -1351,19 +1351,26 @@ namespace OpenSim.Region.Framework.Scenes
1351 if(item.InvType == (sbyte)InventoryType.Landmark) 1351 if(item.InvType == (sbyte)InventoryType.Landmark)
1352 continue; 1352 continue;
1353 1353
1354 if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Copy) == 0) 1354 // apply current to normal permission bits
1355 mask &= ~((uint)PermissionMask.FoldedCopy); 1355 uint newperms = item.CurrentPermissions;
1356 if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Transfer) == 0)
1357 mask &= ~((uint)PermissionMask.FoldedTransfer);
1358 if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Export) == 0)
1359 mask &= ~((uint)PermissionMask.FoldedExport);
1360 1356
1361 if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) 1357 if ((newperms & (uint)PermissionMask.Copy) == 0)
1362 mask &= ~(uint)PermissionMask.Copy; 1358 mask &= ~(uint)PermissionMask.Copy;
1363 if ((item.CurrentPermissions & (uint)PermissionMask.Transfer) == 0) 1359 if ((newperms & (uint)PermissionMask.Transfer) == 0)
1364 mask &= ~(uint)PermissionMask.Transfer; 1360 mask &= ~(uint)PermissionMask.Transfer;
1365 if ((item.CurrentPermissions & (uint)PermissionMask.Export) == 0) 1361 if ((newperms & (uint)PermissionMask.Export) == 0)
1366 mask &= ~((uint)PermissionMask.Export); 1362 mask &= ~((uint)PermissionMask.Export);
1363
1364 // apply next owner restricted by current to folded bits
1365 newperms &= item.NextPermissions;
1366
1367 if ((newperms & (uint)PermissionMask.Copy) == 0)
1368 mask &= ~((uint)PermissionMask.FoldedCopy);
1369 if ((newperms & (uint)PermissionMask.Transfer) == 0)
1370 mask &= ~((uint)PermissionMask.FoldedTransfer);
1371 if ((newperms & (uint)PermissionMask.Export) == 0)
1372 mask &= ~((uint)PermissionMask.FoldedExport);
1373
1367 } 1374 }
1368 return mask; 1375 return mask;
1369 } 1376 }