aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorMelanie2012-08-21 16:41:08 +0200
committerMelanie2012-08-21 16:41:08 +0200
commitf2ac1b9e8aa80a250cba46fec1aa7cf97c6caaf8 (patch)
tree47b1b97f1b54444aa2f6e1e07307e22ae7f0a7d6 /OpenSim/Region/Framework/Scenes
parentFix scripted detach of temp attachments (diff)
downloadopensim-SC-f2ac1b9e8aa80a250cba46fec1aa7cf97c6caaf8.zip
opensim-SC-f2ac1b9e8aa80a250cba46fec1aa7cf97c6caaf8.tar.gz
opensim-SC-f2ac1b9e8aa80a250cba46fec1aa7cf97c6caaf8.tar.bz2
opensim-SC-f2ac1b9e8aa80a250cba46fec1aa7cf97c6caaf8.tar.xz
Add Camera Offsets to serialization
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs14
1 files changed, 14 insertions, 0 deletions
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 }