From f2ac1b9e8aa80a250cba46fec1aa7cf97c6caaf8 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Tue, 21 Aug 2012 16:41:08 +0200
Subject: Add Camera Offsets to serialization
---
.../Scenes/Serialization/SceneObjectSerializer.cs | 14 ++++++++++++++
1 file changed, 14 insertions(+)
(limited to 'OpenSim/Region/Framework')
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
m_SOPXmlProcessors.Add("Friction", ProcessFriction);
m_SOPXmlProcessors.Add("Bounce", ProcessBounce);
m_SOPXmlProcessors.Add("GravityModifier", ProcessGravityModifier);
+ m_SOPXmlProcessors.Add("CameraEyeOffset", ProcessCameraEyeOffset);
+ m_SOPXmlProcessors.Add("CameraAtOffset", ProcessCameraAtOffset);
#endregion
@@ -639,6 +641,16 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
obj.GravityModifier = reader.ReadElementContentAsFloat("GravityModifier", String.Empty);
}
+ private static void ProcessCameraEyeOffset(SceneObjectPart obj, XmlTextReader reader)
+ {
+ obj.SetCameraEyeOffset(Util.ReadVector(reader, "CameraEyeOffset"));
+ }
+
+ private static void ProcessCameraAtOffset(SceneObjectPart obj, XmlTextReader reader)
+ {
+ obj.SetCameraAtOffset(Util.ReadVector(reader, "CameraAtOffset"));
+ }
+
private static void ProcessVehicle(SceneObjectPart obj, XmlTextReader reader)
{
SOPVehicle vehicle = SOPVehicle.FromXml2(reader);
@@ -1355,6 +1367,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
writer.WriteElementString("Bounce", sop.Bounciness.ToString().ToLower());
if (sop.GravityModifier != 1.0f)
writer.WriteElementString("GravityModifier", sop.GravityModifier.ToString().ToLower());
+ WriteVector(writer, "CameraEyeOffset", sop.GetCameraEyeOffset());
+ WriteVector(writer, "CameraAtOffset", sop.GetCameraAtOffset());
writer.WriteEndElement();
}
--
cgit v1.1
From 26224704de9c641cebcc0b47197e1c5a677861cf Mon Sep 17 00:00:00 2001
From: Melanie
Date: Tue, 21 Aug 2012 19:24:41 +0200
Subject: Cause a persistence save if prim flags change
---
OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 6104c66..cb4aa2d 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -3306,6 +3306,8 @@ namespace OpenSim.Region.Framework.Scenes
///
public void UpdatePrimFlags(uint localID, bool UsePhysics, bool SetTemporary, bool SetPhantom, bool SetVolumeDetect)
{
+ HasGroupChanged = true;
+
SceneObjectPart selectionPart = GetPart(localID);
if (SetTemporary && Scene != null)
--
cgit v1.1
From 526445c39456763577d0b013ccab8af16a9edee0 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Tue, 21 Aug 2012 23:28:00 +0200
Subject: Fix group return stuff
---
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 0b73df5..f8c0431 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -2050,7 +2050,7 @@ namespace OpenSim.Region.Framework.Scenes
if (Permissions.CanReturnObjects(
null,
remoteClient.AgentId,
- deleteGroups))
+ new List() {grp}))
{
permissionToTake = true;
permissionToDelete = true;
--
cgit v1.1
From 450207d4d8004aadbbc7146869132e8245d58ada Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 22 Aug 2012 00:27:54 +0200
Subject: Make terrain save every 1000 frames instead of every 50. Database
load is a sim killer.
---
OpenSim/Region/Framework/Scenes/Scene.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework')
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
private int m_update_presences = 1; // Update scene presence movements
private int m_update_events = 1;
private int m_update_backup = 200;
- private int m_update_terrain = 50;
+ private int m_update_terrain = 1000;
private int m_update_land = 10;
private int m_update_coarse_locations = 50;
--
cgit v1.1
From c1a0c7fad17bb2aead1539b61fe82fee16686190 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Thu, 23 Aug 2012 23:09:32 +0200
Subject: Fix bad child prim permissions that can make objects change perms
after rezzing
---
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 3 +++
OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 18 +++++++++++++++---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 21 +++++++++++++++++++++
3 files changed, 39 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/Framework')
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
SceneObjectGroup grp = part.ParentGroup;
+ // If child prims have invalid perms, fix them
+ grp.AdjustChildPrimPermissions();
+
if (remoteClient == null)
{
// 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
// Can't do this yet since backup still makes use of the root part without any synchronization
// objectGroup.m_rootPart = null;
+ // If linking prims with different permissions, fix them
+ AdjustChildPrimPermissions();
+
AttachToBackup();
// 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
}
}
+ public void AdjustChildPrimPermissions()
+ {
+ ForEachPart(part =>
+ {
+ if (part != RootPart)
+ part.ClonePermissions(RootPart);
+ });
+ }
+
public void UpdatePermissions(UUID AgentID, byte field, uint localID,
uint mask, byte addRemTF)
{
- SceneObjectPart[] parts = m_parts.GetArray();
- for (int i = 0; i < parts.Length; i++)
- parts[i].UpdatePermissions(AgentID, field, localID, mask, addRemTF);
+ RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF);
+
+ AdjustChildPrimPermissions();
HasGroupChanged = true;
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
}
}
+ public void ClonePermissions(SceneObjectPart source)
+ {
+ bool update = false;
+
+ if (BaseMask != source.BaseMask ||
+ OwnerMask != source.OwnerMask ||
+ GroupMask != source.GroupMask ||
+ EveryoneMask != source.EveryoneMask ||
+ NextOwnerMask != source.NextOwnerMask)
+ update = true;
+
+ BaseMask = source.BaseMask;
+ OwnerMask = source.OwnerMask;
+ GroupMask = source.GroupMask;
+ EveryoneMask = source.EveryoneMask;
+ NextOwnerMask = source.NextOwnerMask;
+
+ if (update)
+ SendFullUpdateToAllClients();
+ }
+
public bool IsHingeJoint()
{
// For now, we use the NINJA naming scheme for identifying joints.
--
cgit v1.1