diff options
Diffstat (limited to '')
5 files changed, 57 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 0b73df5..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 |
@@ -2050,7 +2053,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2050 | if (Permissions.CanReturnObjects( | 2053 | if (Permissions.CanReturnObjects( |
2051 | null, | 2054 | null, |
2052 | remoteClient.AgentId, | 2055 | remoteClient.AgentId, |
2053 | deleteGroups)) | 2056 | new List<SceneObjectGroup>() {grp})) |
2054 | { | 2057 | { |
2055 | permissionToTake = true; | 2058 | permissionToTake = true; |
2056 | permissionToDelete = true; | 2059 | permissionToDelete = true; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a5f0bff..57fcf51 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -215,7 +215,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
215 | private int m_update_presences = 1; // Update scene presence movements | 215 | private int m_update_presences = 1; // Update scene presence movements |
216 | private int m_update_events = 1; | 216 | private int m_update_events = 1; |
217 | private int m_update_backup = 200; | 217 | private int m_update_backup = 200; |
218 | private int m_update_terrain = 50; | 218 | private int m_update_terrain = 1000; |
219 | private int m_update_land = 10; | 219 | private int m_update_land = 10; |
220 | private int m_update_coarse_locations = 50; | 220 | private int m_update_coarse_locations = 50; |
221 | 221 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 6104c66..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 |
@@ -3306,6 +3309,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3306 | /// <param name="SetVolumeDetect"></param> | 3309 | /// <param name="SetVolumeDetect"></param> |
3307 | public void UpdatePrimFlags(uint localID, bool UsePhysics, bool SetTemporary, bool SetPhantom, bool SetVolumeDetect) | 3310 | public void UpdatePrimFlags(uint localID, bool UsePhysics, bool SetTemporary, bool SetPhantom, bool SetVolumeDetect) |
3308 | { | 3311 | { |
3312 | HasGroupChanged = true; | ||
3313 | |||
3309 | SceneObjectPart selectionPart = GetPart(localID); | 3314 | SceneObjectPart selectionPart = GetPart(localID); |
3310 | 3315 | ||
3311 | if (SetTemporary && Scene != null) | 3316 | if (SetTemporary && Scene != null) |
@@ -3389,12 +3394,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
3389 | } | 3394 | } |
3390 | } | 3395 | } |
3391 | 3396 | ||
3397 | public void AdjustChildPrimPermissions() | ||
3398 | { | ||
3399 | ForEachPart(part => | ||
3400 | { | ||
3401 | if (part != RootPart) | ||
3402 | part.ClonePermissions(RootPart); | ||
3403 | }); | ||
3404 | } | ||
3405 | |||
3392 | public void UpdatePermissions(UUID AgentID, byte field, uint localID, | 3406 | public void UpdatePermissions(UUID AgentID, byte field, uint localID, |
3393 | uint mask, byte addRemTF) | 3407 | uint mask, byte addRemTF) |
3394 | { | 3408 | { |
3395 | SceneObjectPart[] parts = m_parts.GetArray(); | 3409 | RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF); |
3396 | for (int i = 0; i < parts.Length; i++) | 3410 | |
3397 | parts[i].UpdatePermissions(AgentID, field, localID, mask, addRemTF); | 3411 | AdjustChildPrimPermissions(); |
3398 | 3412 | ||
3399 | HasGroupChanged = true; | 3413 | HasGroupChanged = true; |
3400 | 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. |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 0d292e7..134bd9d 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -386,6 +386,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
386 | m_SOPXmlProcessors.Add("Friction", ProcessFriction); | 386 | m_SOPXmlProcessors.Add("Friction", ProcessFriction); |
387 | m_SOPXmlProcessors.Add("Bounce", ProcessBounce); | 387 | m_SOPXmlProcessors.Add("Bounce", ProcessBounce); |
388 | m_SOPXmlProcessors.Add("GravityModifier", ProcessGravityModifier); | 388 | m_SOPXmlProcessors.Add("GravityModifier", ProcessGravityModifier); |
389 | m_SOPXmlProcessors.Add("CameraEyeOffset", ProcessCameraEyeOffset); | ||
390 | m_SOPXmlProcessors.Add("CameraAtOffset", ProcessCameraAtOffset); | ||
389 | 391 | ||
390 | #endregion | 392 | #endregion |
391 | 393 | ||
@@ -639,6 +641,16 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
639 | obj.GravityModifier = reader.ReadElementContentAsFloat("GravityModifier", String.Empty); | 641 | obj.GravityModifier = reader.ReadElementContentAsFloat("GravityModifier", String.Empty); |
640 | } | 642 | } |
641 | 643 | ||
644 | private static void ProcessCameraEyeOffset(SceneObjectPart obj, XmlTextReader reader) | ||
645 | { | ||
646 | obj.SetCameraEyeOffset(Util.ReadVector(reader, "CameraEyeOffset")); | ||
647 | } | ||
648 | |||
649 | private static void ProcessCameraAtOffset(SceneObjectPart obj, XmlTextReader reader) | ||
650 | { | ||
651 | obj.SetCameraAtOffset(Util.ReadVector(reader, "CameraAtOffset")); | ||
652 | } | ||
653 | |||
642 | private static void ProcessVehicle(SceneObjectPart obj, XmlTextReader reader) | 654 | private static void ProcessVehicle(SceneObjectPart obj, XmlTextReader reader) |
643 | { | 655 | { |
644 | SOPVehicle vehicle = SOPVehicle.FromXml2(reader); | 656 | SOPVehicle vehicle = SOPVehicle.FromXml2(reader); |
@@ -1355,6 +1367,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1355 | writer.WriteElementString("Bounce", sop.Bounciness.ToString().ToLower()); | 1367 | writer.WriteElementString("Bounce", sop.Bounciness.ToString().ToLower()); |
1356 | if (sop.GravityModifier != 1.0f) | 1368 | if (sop.GravityModifier != 1.0f) |
1357 | writer.WriteElementString("GravityModifier", sop.GravityModifier.ToString().ToLower()); | 1369 | writer.WriteElementString("GravityModifier", sop.GravityModifier.ToString().ToLower()); |
1370 | WriteVector(writer, "CameraEyeOffset", sop.GetCameraEyeOffset()); | ||
1371 | WriteVector(writer, "CameraAtOffset", sop.GetCameraAtOffset()); | ||
1358 | 1372 | ||
1359 | writer.WriteEndElement(); | 1373 | writer.WriteEndElement(); |
1360 | } | 1374 | } |