diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index f490d90..ee61de6 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -307,6 +307,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
307 | 307 | ||
308 | private bool m_isBackedUp; | 308 | private bool m_isBackedUp; |
309 | 309 | ||
310 | public bool IsBackedUp | ||
311 | { | ||
312 | get { return m_isBackedUp; } | ||
313 | } | ||
314 | |||
310 | protected MapAndArray<UUID, SceneObjectPart> m_parts = new MapAndArray<UUID, SceneObjectPart>(); | 315 | protected MapAndArray<UUID, SceneObjectPart> m_parts = new MapAndArray<UUID, SceneObjectPart>(); |
311 | 316 | ||
312 | protected ulong m_regionHandle; | 317 | protected ulong m_regionHandle; |
@@ -3410,11 +3415,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
3410 | 3415 | ||
3411 | public void AdjustChildPrimPermissions() | 3416 | public void AdjustChildPrimPermissions() |
3412 | { | 3417 | { |
3418 | uint newOwnerMask = (uint)PermissionMask.All & 0xfffffff8; // Mask folded bits | ||
3419 | uint foldedPerms = RootPart.OwnerMask & 3; | ||
3420 | |||
3413 | ForEachPart(part => | 3421 | ForEachPart(part => |
3414 | { | 3422 | { |
3423 | newOwnerMask &= part.BaseMask; | ||
3415 | if (part != RootPart) | 3424 | if (part != RootPart) |
3416 | part.ClonePermissions(RootPart); | 3425 | part.ClonePermissions(RootPart); |
3417 | }); | 3426 | }); |
3427 | |||
3428 | RootPart.OwnerMask = newOwnerMask | foldedPerms; | ||
3429 | RootPart.ScheduleFullUpdate(); | ||
3418 | } | 3430 | } |
3419 | 3431 | ||
3420 | public void UpdatePermissions(UUID AgentID, byte field, uint localID, | 3432 | public void UpdatePermissions(UUID AgentID, byte field, uint localID, |
@@ -3422,8 +3434,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
3422 | { | 3434 | { |
3423 | RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF); | 3435 | RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF); |
3424 | 3436 | ||
3437 | bool god = Scene.Permissions.IsGod(AgentID); | ||
3438 | |||
3439 | if (field == 1 && god) | ||
3440 | { | ||
3441 | ForEachPart(part => | ||
3442 | { | ||
3443 | part.BaseMask = RootPart.BaseMask; | ||
3444 | }); | ||
3445 | } | ||
3446 | |||
3425 | AdjustChildPrimPermissions(); | 3447 | AdjustChildPrimPermissions(); |
3426 | 3448 | ||
3449 | if (field == 1 && god) // Base mask was set. Update all child part inventories | ||
3450 | { | ||
3451 | foreach (SceneObjectPart part in Parts) | ||
3452 | part.Inventory.ApplyGodPermissions(RootPart.BaseMask); | ||
3453 | } | ||
3454 | |||
3427 | HasGroupChanged = true; | 3455 | HasGroupChanged = true; |
3428 | 3456 | ||
3429 | // Send the group's properties to all clients once all parts are updated | 3457 | // Send the group's properties to all clients once all parts are updated |