diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 14 |
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 | } |