aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-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 cb4aa2d..eee53d7 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 ce652b4..ed626d0 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -4487,6 +4487,27 @@ namespace OpenSim.Region.Framework.Scenes
4487 } 4487 }
4488 } 4488 }
4489 4489
4490 public void ClonePermissions(SceneObjectPart source)
4491 {
4492 bool update = false;
4493
4494 if (BaseMask != source.BaseMask ||
4495 OwnerMask != source.OwnerMask ||
4496 GroupMask != source.GroupMask ||
4497 EveryoneMask != source.EveryoneMask ||
4498 NextOwnerMask != source.NextOwnerMask)
4499 update = true;
4500
4501 BaseMask = source.BaseMask;
4502 OwnerMask = source.OwnerMask;
4503 GroupMask = source.GroupMask;
4504 EveryoneMask = source.EveryoneMask;
4505 NextOwnerMask = source.NextOwnerMask;
4506
4507 if (update)
4508 SendFullUpdateToAllClients();
4509 }
4510
4490 public bool IsHingeJoint() 4511 public bool IsHingeJoint()
4491 { 4512 {
4492 // For now, we use the NINJA naming scheme for identifying joints. 4513 // For now, we use the NINJA naming scheme for identifying joints.