diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 0d09cef..c1faf21 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1258,6 +1258,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1258 | agentItem.InvType = taskItem.InvType; | 1258 | agentItem.InvType = taskItem.InvType; |
1259 | agentItem.Flags = taskItem.Flags; | 1259 | agentItem.Flags = taskItem.Flags; |
1260 | 1260 | ||
1261 | // The code below isn't OK. It doesn't account for flags being changed | ||
1262 | // in the object inventory, so it will break when you do it. That | ||
1263 | // is the previous behaviour, so no matter at this moment. However, there is a lot | ||
1264 | // TODO: Fix this after the inventory fixer exists and has beenr run | ||
1261 | if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions()) | 1265 | if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions()) |
1262 | { | 1266 | { |
1263 | agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); | 1267 | agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); |
@@ -1266,7 +1270,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1266 | else | 1270 | else |
1267 | agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions; | 1271 | agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions; |
1268 | 1272 | ||
1269 | agentItem.CurrentPermissions = agentItem.BasePermissions; | 1273 | agentItem.BasePermissions = agentItem.CurrentPermissions; |
1270 | 1274 | ||
1271 | agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; | 1275 | agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; |
1272 | agentItem.Flags &= ~(uint)(InventoryItemFlags.ObjectOverwriteBase | InventoryItemFlags.ObjectOverwriteOwner | InventoryItemFlags.ObjectOverwriteGroup | InventoryItemFlags.ObjectOverwriteEveryone | InventoryItemFlags.ObjectOverwriteNextOwner); | 1276 | agentItem.Flags &= ~(uint)(InventoryItemFlags.ObjectOverwriteBase | InventoryItemFlags.ObjectOverwriteOwner | InventoryItemFlags.ObjectOverwriteGroup | InventoryItemFlags.ObjectOverwriteEveryone | InventoryItemFlags.ObjectOverwriteNextOwner); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 02b94ce..bf56de2 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -943,8 +943,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
943 | 943 | ||
944 | group.SetGroup(m_part.GroupID, null); | 944 | group.SetGroup(m_part.GroupID, null); |
945 | 945 | ||
946 | // TODO: Remove magic number badness | 946 | if ((rootPart.OwnerID != item.OwnerID) || (item.CurrentPermissions & (uint)PermissionMask.Slam) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) |
947 | if ((rootPart.OwnerID != item.OwnerID) || (item.CurrentPermissions & 16) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) // Magic number | ||
948 | { | 947 | { |
949 | if (m_part.ParentGroup.Scene.Permissions.PropagatePermissions()) | 948 | if (m_part.ParentGroup.Scene.Permissions.PropagatePermissions()) |
950 | { | 949 | { |
@@ -964,8 +963,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
964 | 963 | ||
965 | foreach (SceneObjectPart part in partList) | 964 | foreach (SceneObjectPart part in partList) |
966 | { | 965 | { |
967 | // TODO: Remove magic number badness | 966 | if ((part.OwnerID != item.OwnerID) || (item.CurrentPermissions & (uint)PermissionMask.Slam) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) |
968 | if ((part.OwnerID != item.OwnerID) || (item.CurrentPermissions & 16) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) // Magic number | ||
969 | { | 967 | { |
970 | part.LastOwnerID = part.OwnerID; | 968 | part.LastOwnerID = part.OwnerID; |
971 | part.OwnerID = item.OwnerID; | 969 | part.OwnerID = item.OwnerID; |