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/Scenes') 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/Scenes') 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/Scenes') 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/Scenes') 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