diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index bf898bb..985f0a0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -3429,11 +3429,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
3429 | 3429 | ||
3430 | public void AdjustChildPrimPermissions() | 3430 | public void AdjustChildPrimPermissions() |
3431 | { | 3431 | { |
3432 | uint newOwnerMask = (uint)PermissionMask.All & 0xfffffff8; // Mask folded bits | ||
3433 | uint foldedPerms = RootPart.OwnerMask & 3; | ||
3434 | |||
3432 | ForEachPart(part => | 3435 | ForEachPart(part => |
3433 | { | 3436 | { |
3437 | newOwnerMask &= part.BaseMask; | ||
3434 | if (part != RootPart) | 3438 | if (part != RootPart) |
3435 | part.ClonePermissions(RootPart); | 3439 | part.ClonePermissions(RootPart); |
3436 | }); | 3440 | }); |
3441 | |||
3442 | RootPart.OwnerMask = newOwnerMask | foldedPerms; | ||
3443 | RootPart.ScheduleFullUpdate(); | ||
3437 | } | 3444 | } |
3438 | 3445 | ||
3439 | public void UpdatePermissions(UUID AgentID, byte field, uint localID, | 3446 | public void UpdatePermissions(UUID AgentID, byte field, uint localID, |
@@ -3441,8 +3448,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
3441 | { | 3448 | { |
3442 | RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF); | 3449 | RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF); |
3443 | 3450 | ||
3451 | bool god = Scene.Permissions.IsGod(AgentID); | ||
3452 | |||
3444 | AdjustChildPrimPermissions(); | 3453 | AdjustChildPrimPermissions(); |
3445 | 3454 | ||
3455 | if (field == 1 && god) // Base mask was set. Update all child part inventories | ||
3456 | { | ||
3457 | foreach (SceneObjectPart part in Parts) | ||
3458 | part.Inventory.ApplyGodPermissions(RootPart.BaseMask); | ||
3459 | } | ||
3460 | |||
3446 | HasGroupChanged = true; | 3461 | HasGroupChanged = true; |
3447 | 3462 | ||
3448 | // Send the group's properties to all clients once all parts are updated | 3463 | // Send the group's properties to all clients once all parts are updated |