diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 033170d..d14c450 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2441,17 +2441,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
2441 | dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); | 2441 | dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); |
2442 | dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; | 2442 | dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; |
2443 | 2443 | ||
2444 | |||
2445 | if (userExposed) | 2444 | if (userExposed) |
2446 | dupe.m_rootPart.TrimPermissions(); | 2445 | dupe.m_rootPart.TrimPermissions(); |
2447 | 2446 | ||
2448 | List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.GetArray()); | 2447 | List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.GetArray()); |
2449 | 2448 | ||
2450 | partList.Sort(delegate(SceneObjectPart p1, SceneObjectPart p2) | 2449 | partList.Sort(delegate(SceneObjectPart p1, SceneObjectPart p2) |
2451 | { | 2450 | { |
2452 | return p1.LinkNum.CompareTo(p2.LinkNum); | 2451 | return p1.LinkNum.CompareTo(p2.LinkNum); |
2453 | } | 2452 | } |
2454 | ); | 2453 | ); |
2455 | 2454 | ||
2456 | foreach (SceneObjectPart part in partList) | 2455 | foreach (SceneObjectPart part in partList) |
2457 | { | 2456 | { |
@@ -2503,10 +2502,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2503 | if (dupe.m_rootPart.PhysActor != null) | 2502 | if (dupe.m_rootPart.PhysActor != null) |
2504 | dupe.m_rootPart.PhysActor.Building = false; // tell physics to finish building | 2503 | dupe.m_rootPart.PhysActor.Building = false; // tell physics to finish building |
2505 | 2504 | ||
2505 | dupe.AggregateDeepPerms(); | ||
2506 | |||
2506 | dupe.HasGroupChanged = true; | 2507 | dupe.HasGroupChanged = true; |
2507 | dupe.AttachToBackup(); | 2508 | dupe.AttachToBackup(); |
2508 | 2509 | ||
2509 | ScheduleGroupForFullUpdate(); | 2510 | dupe.ScheduleGroupForFullUpdate(); |
2510 | } | 2511 | } |
2511 | 2512 | ||
2512 | m_dupeInProgress = false; | 2513 | m_dupeInProgress = false; |
@@ -3426,6 +3427,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3426 | objectGroup.HasGroupChangedDueToDelink = true; | 3427 | objectGroup.HasGroupChangedDueToDelink = true; |
3427 | 3428 | ||
3428 | InvalidBoundsRadius(); | 3429 | InvalidBoundsRadius(); |
3430 | objectGroup.AggregatePerms(); | ||
3429 | 3431 | ||
3430 | if (sendEvents) | 3432 | if (sendEvents) |
3431 | linkPart.TriggerScriptChangedEvent(Changed.LINK); | 3433 | linkPart.TriggerScriptChangedEvent(Changed.LINK); |
@@ -3964,8 +3966,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3964 | 3966 | ||
3965 | public void AdjustChildPrimPermissions(bool forceTaskInventoryPermissive) | 3967 | public void AdjustChildPrimPermissions(bool forceTaskInventoryPermissive) |
3966 | { | 3968 | { |
3967 | uint newOwnerMask = (uint)(PermissionMask.All | PermissionMask.Export) & 0xfffffff8; // Mask folded bits | 3969 | uint newOwnerMask = (uint)(PermissionMask.All | PermissionMask.Export) & 0xfffffff0; // Mask folded bits |
3968 | uint foldedPerms = RootPart.OwnerMask & 3; | 3970 | uint foldedPerms = RootPart.OwnerMask & (uint)PermissionMask.FoldedMask; |
3969 | 3971 | ||
3970 | ForEachPart(part => | 3972 | ForEachPart(part => |
3971 | { | 3973 | { |
@@ -3976,14 +3978,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
3976 | part.Inventory.ApplyGodPermissions(part.BaseMask); | 3978 | part.Inventory.ApplyGodPermissions(part.BaseMask); |
3977 | }); | 3979 | }); |
3978 | 3980 | ||
3979 | uint lockMask = ~(uint)(PermissionMask.Move | PermissionMask.Modify); | 3981 | uint lockMask = ~(uint)(PermissionMask.Move); |
3980 | uint lockBit = RootPart.OwnerMask & (uint)(PermissionMask.Move | PermissionMask.Modify); | 3982 | uint lockBit = RootPart.OwnerMask & (uint)(PermissionMask.Move); |
3981 | RootPart.OwnerMask = (RootPart.OwnerMask & lockBit) | ((newOwnerMask | foldedPerms) & lockMask); | 3983 | RootPart.OwnerMask = (RootPart.OwnerMask & lockBit) | ((newOwnerMask | foldedPerms) & lockMask); |
3982 | 3984 | ||
3983 | // m_log.DebugFormat( | 3985 | // m_log.DebugFormat( |
3984 | // "[SCENE OBJECT GROUP]: RootPart.OwnerMask now {0} for {1} in {2}", | 3986 | // "[SCENE OBJECT GROUP]: RootPart.OwnerMask now {0} for {1} in {2}", |
3985 | // (OpenMetaverse.PermissionMask)RootPart.OwnerMask, Name, Scene.Name); | 3987 | // (OpenMetaverse.PermissionMask)RootPart.OwnerMask, Name, Scene.Name); |
3986 | 3988 | AggregatePerms(); | |
3987 | RootPart.ScheduleFullUpdate(); | 3989 | RootPart.ScheduleFullUpdate(); |
3988 | } | 3990 | } |
3989 | 3991 | ||
@@ -4008,6 +4010,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4008 | { | 4010 | { |
4009 | foreach (SceneObjectPart part in Parts) | 4011 | foreach (SceneObjectPart part in Parts) |
4010 | part.Inventory.ApplyGodPermissions(RootPart.BaseMask); | 4012 | part.Inventory.ApplyGodPermissions(RootPart.BaseMask); |
4013 | AggregatePerms(); | ||
4011 | } | 4014 | } |
4012 | 4015 | ||
4013 | HasGroupChanged = true; | 4016 | HasGroupChanged = true; |
@@ -5223,6 +5226,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5223 | { | 5226 | { |
5224 | part.ResetOwnerChangeFlag(); | 5227 | part.ResetOwnerChangeFlag(); |
5225 | }); | 5228 | }); |
5229 | AggregatePerms(); | ||
5226 | } | 5230 | } |
5227 | 5231 | ||
5228 | // clear some references to easy cg | 5232 | // clear some references to easy cg |