diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 3b1ab01..8761284 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -815,14 +815,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
815 | 815 | ||
816 | group.SetGroup(m_part.GroupID, null); | 816 | group.SetGroup(m_part.GroupID, null); |
817 | 817 | ||
818 | if ((rootPart.OwnerID != item.OwnerID) || (item.CurrentPermissions & 16) != 0) | 818 | // TODO: Remove magic number badness |
819 | if ((rootPart.OwnerID != item.OwnerID) || (item.CurrentPermissions & 16) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) // Magic number | ||
819 | { | 820 | { |
820 | if (m_part.ParentGroup.Scene.Permissions.PropagatePermissions()) | 821 | if (m_part.ParentGroup.Scene.Permissions.PropagatePermissions()) |
821 | { | 822 | { |
822 | foreach (SceneObjectPart part in partList) | 823 | foreach (SceneObjectPart part in partList) |
823 | { | 824 | { |
824 | part.EveryoneMask = item.EveryonePermissions; | 825 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0) |
825 | part.NextOwnerMask = item.NextPermissions; | 826 | part.EveryoneMask = item.EveryonePermissions; |
827 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0) | ||
828 | part.NextOwnerMask = item.NextPermissions; | ||
829 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0) | ||
830 | part.GroupMask = item.GroupPermissions; | ||
826 | } | 831 | } |
827 | 832 | ||
828 | group.ApplyNextOwnerPermissions(); | 833 | group.ApplyNextOwnerPermissions(); |
@@ -831,15 +836,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
831 | 836 | ||
832 | foreach (SceneObjectPart part in partList) | 837 | foreach (SceneObjectPart part in partList) |
833 | { | 838 | { |
834 | if ((part.OwnerID != item.OwnerID) || (item.CurrentPermissions & 16) != 0) | 839 | // TODO: Remove magic number badness |
840 | if ((part.OwnerID != item.OwnerID) || (item.CurrentPermissions & 16) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) // Magic number | ||
835 | { | 841 | { |
836 | part.LastOwnerID = part.OwnerID; | 842 | part.LastOwnerID = part.OwnerID; |
837 | part.OwnerID = item.OwnerID; | 843 | part.OwnerID = item.OwnerID; |
838 | part.Inventory.ChangeInventoryOwner(item.OwnerID); | 844 | part.Inventory.ChangeInventoryOwner(item.OwnerID); |
839 | } | 845 | } |
840 | 846 | ||
841 | part.EveryoneMask = item.EveryonePermissions; | 847 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0) |
842 | part.NextOwnerMask = item.NextPermissions; | 848 | part.EveryoneMask = item.EveryonePermissions; |
849 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0) | ||
850 | part.NextOwnerMask = item.NextPermissions; | ||
851 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0) | ||
852 | part.GroupMask = item.GroupPermissions; | ||
843 | } | 853 | } |
844 | 854 | ||
845 | rootPart.TrimPermissions(); | 855 | rootPart.TrimPermissions(); |