diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 26 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | 2 |
2 files changed, 17 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 1ebccd1..f2cc16c 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -434,10 +434,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
434 | item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask; | 434 | item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask; |
435 | item.GroupPermissions = objectGroup.RootPart.GroupMask & objectGroup.RootPart.NextOwnerMask; | 435 | item.GroupPermissions = objectGroup.RootPart.GroupMask & objectGroup.RootPart.NextOwnerMask; |
436 | 436 | ||
437 | // Magic number badness. Maybe this deserves an enum. | 437 | item.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; |
438 | // bit 4 (16) is the "Slam" bit, it means treat as passed | ||
439 | // and apply next owner perms on rez | ||
440 | item.CurrentPermissions |= 16; // Slam! | ||
441 | } | 438 | } |
442 | else | 439 | else |
443 | { | 440 | { |
@@ -641,7 +638,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
641 | rootPart.Description = item.Description; | 638 | rootPart.Description = item.Description; |
642 | 639 | ||
643 | group.SetGroup(remoteClient.ActiveGroupId, remoteClient); | 640 | group.SetGroup(remoteClient.ActiveGroupId, remoteClient); |
644 | if ((rootPart.OwnerID != item.Owner) || (item.CurrentPermissions & 16) != 0) | 641 | if ((rootPart.OwnerID != item.Owner) || |
642 | (item.CurrentPermissions & 16) != 0 || // Magic number | ||
643 | (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) | ||
645 | { | 644 | { |
646 | //Need to kill the for sale here | 645 | //Need to kill the for sale here |
647 | rootPart.ObjectSaleType = 0; | 646 | rootPart.ObjectSaleType = 0; |
@@ -651,9 +650,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
651 | { | 650 | { |
652 | foreach (SceneObjectPart part in group.Parts) | 651 | foreach (SceneObjectPart part in group.Parts) |
653 | { | 652 | { |
654 | part.EveryoneMask = item.EveryOnePermissions; | 653 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0) |
655 | part.NextOwnerMask = item.NextPermissions; | 654 | part.EveryoneMask = item.EveryOnePermissions; |
656 | part.GroupMask = 0; // DO NOT propagate here | 655 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0) |
656 | part.NextOwnerMask = item.NextPermissions; | ||
657 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0) | ||
658 | part.GroupMask = item.GroupPermissions; | ||
657 | } | 659 | } |
658 | 660 | ||
659 | group.ApplyNextOwnerPermissions(); | 661 | group.ApplyNextOwnerPermissions(); |
@@ -669,8 +671,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
669 | part.Inventory.ChangeInventoryOwner(item.Owner); | 671 | part.Inventory.ChangeInventoryOwner(item.Owner); |
670 | part.GroupMask = 0; // DO NOT propagate here | 672 | part.GroupMask = 0; // DO NOT propagate here |
671 | } | 673 | } |
672 | part.EveryoneMask = item.EveryOnePermissions; | 674 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0) |
673 | part.NextOwnerMask = item.NextPermissions; | 675 | part.EveryoneMask = item.EveryOnePermissions; |
676 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0) | ||
677 | part.NextOwnerMask = item.NextPermissions; | ||
678 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0) | ||
679 | part.GroupMask = item.GroupPermissions; | ||
674 | } | 680 | } |
675 | 681 | ||
676 | rootPart.TrimPermissions(); | 682 | rootPart.TrimPermissions(); |
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index 568ba19..be399ff 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | |||
@@ -215,7 +215,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
215 | part.NextOwnerMask; | 215 | part.NextOwnerMask; |
216 | item.GroupPermissions = part.GroupMask & | 216 | item.GroupPermissions = part.GroupMask & |
217 | part.NextOwnerMask; | 217 | part.NextOwnerMask; |
218 | item.CurrentPermissions |= 16; // Slam! | 218 | item.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; |
219 | item.CreationDate = Util.UnixTimeSinceEpoch(); | 219 | item.CreationDate = Util.UnixTimeSinceEpoch(); |
220 | 220 | ||
221 | if (m_scene.AddInventoryItem(item)) | 221 | if (m_scene.AddInventoryItem(item)) |