aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs18
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs21
3 files changed, 39 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index f8c0431..1309623 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1983,6 +1983,9 @@ namespace OpenSim.Region.Framework.Scenes
1983 1983
1984 SceneObjectGroup grp = part.ParentGroup; 1984 SceneObjectGroup grp = part.ParentGroup;
1985 1985
1986 // If child prims have invalid perms, fix them
1987 grp.AdjustChildPrimPermissions();
1988
1986 if (remoteClient == null) 1989 if (remoteClient == null)
1987 { 1990 {
1988 // Autoreturn has a null client. Nothing else does. So 1991 // Autoreturn has a null client. Nothing else does. So
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 6e48735..fcb1571 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -2852,6 +2852,9 @@ namespace OpenSim.Region.Framework.Scenes
2852 // Can't do this yet since backup still makes use of the root part without any synchronization 2852 // Can't do this yet since backup still makes use of the root part without any synchronization
2853// objectGroup.m_rootPart = null; 2853// objectGroup.m_rootPart = null;
2854 2854
2855 // If linking prims with different permissions, fix them
2856 AdjustChildPrimPermissions();
2857
2855 AttachToBackup(); 2858 AttachToBackup();
2856 2859
2857 // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the 2860 // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the
@@ -3391,12 +3394,21 @@ namespace OpenSim.Region.Framework.Scenes
3391 } 3394 }
3392 } 3395 }
3393 3396
3397 public void AdjustChildPrimPermissions()
3398 {
3399 ForEachPart(part =>
3400 {
3401 if (part != RootPart)
3402 part.ClonePermissions(RootPart);
3403 });
3404 }
3405
3394 public void UpdatePermissions(UUID AgentID, byte field, uint localID, 3406 public void UpdatePermissions(UUID AgentID, byte field, uint localID,
3395 uint mask, byte addRemTF) 3407 uint mask, byte addRemTF)
3396 { 3408 {
3397 SceneObjectPart[] parts = m_parts.GetArray(); 3409 RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF);
3398 for (int i = 0; i < parts.Length; i++) 3410
3399 parts[i].UpdatePermissions(AgentID, field, localID, mask, addRemTF); 3411 AdjustChildPrimPermissions();
3400 3412
3401 HasGroupChanged = true; 3413 HasGroupChanged = true;
3402 3414
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index af06250..4ed3413 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -4503,6 +4503,27 @@ namespace OpenSim.Region.Framework.Scenes
4503 } 4503 }
4504 } 4504 }
4505 4505
4506 public void ClonePermissions(SceneObjectPart source)
4507 {
4508 bool update = false;
4509
4510 if (BaseMask != source.BaseMask ||
4511 OwnerMask != source.OwnerMask ||
4512 GroupMask != source.GroupMask ||
4513 EveryoneMask != source.EveryoneMask ||
4514 NextOwnerMask != source.NextOwnerMask)
4515 update = true;
4516
4517 BaseMask = source.BaseMask;
4518 OwnerMask = source.OwnerMask;
4519 GroupMask = source.GroupMask;
4520 EveryoneMask = source.EveryoneMask;
4521 NextOwnerMask = source.NextOwnerMask;
4522
4523 if (update)
4524 SendFullUpdateToAllClients();
4525 }
4526
4506 public bool IsHingeJoint() 4527 public bool IsHingeJoint()
4507 { 4528 {
4508 // For now, we use the NINJA naming scheme for identifying joints. 4529 // For now, we use the NINJA naming scheme for identifying joints.