aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Serialization
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs23
1 files changed, 22 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index a12a401..87d1ace 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -453,9 +453,10 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
453 m_SOPXmlProcessors.Add("Torque", ProcessTorque); 453 m_SOPXmlProcessors.Add("Torque", ProcessTorque);
454 m_SOPXmlProcessors.Add("VolumeDetectActive", ProcessVolumeDetectActive); 454 m_SOPXmlProcessors.Add("VolumeDetectActive", ProcessVolumeDetectActive);
455 455
456
457 m_SOPXmlProcessors.Add("Vehicle", ProcessVehicle); 456 m_SOPXmlProcessors.Add("Vehicle", ProcessVehicle);
458 457
458 m_SOPXmlProcessors.Add("PhysicsInertia", ProcessPhysicsInertia);
459
459 m_SOPXmlProcessors.Add("RotationAxisLocks", ProcessRotationAxisLocks); 460 m_SOPXmlProcessors.Add("RotationAxisLocks", ProcessRotationAxisLocks);
460 m_SOPXmlProcessors.Add("PhysicsShapeType", ProcessPhysicsShapeType); 461 m_SOPXmlProcessors.Add("PhysicsShapeType", ProcessPhysicsShapeType);
461 m_SOPXmlProcessors.Add("Density", ProcessDensity); 462 m_SOPXmlProcessors.Add("Density", ProcessDensity);
@@ -781,6 +782,23 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
781 } 782 }
782 } 783 }
783 784
785 private static void ProcessPhysicsInertia(SceneObjectPart obj, XmlReader reader)
786 {
787 PhysicsInertiaData pdata = PhysicsInertiaData.FromXml2(reader);
788
789 if (pdata == null)
790 {
791 obj.PhysicsInertia = null;
792 m_log.DebugFormat(
793 "[SceneObjectSerializer]: Parsing PhysicsInertiaData for object part {0} {1} encountered errors. Please see earlier log entries.",
794 obj.Name, obj.UUID);
795 }
796 else
797 {
798 obj.PhysicsInertia = pdata;
799 }
800 }
801
784 private static void ProcessShape(SceneObjectPart obj, XmlReader reader) 802 private static void ProcessShape(SceneObjectPart obj, XmlReader reader)
785 { 803 {
786 List<string> errorNodeNames; 804 List<string> errorNodeNames;
@@ -1498,6 +1516,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1498 if (sop.VehicleParams != null) 1516 if (sop.VehicleParams != null)
1499 sop.VehicleParams.ToXml2(writer); 1517 sop.VehicleParams.ToXml2(writer);
1500 1518
1519 if (sop.PhysicsInertia != null)
1520 sop.PhysicsInertia.ToXml2(writer);
1521
1501 if(sop.RotationAxisLocks != 0) 1522 if(sop.RotationAxisLocks != 0)
1502 writer.WriteElementString("RotationAxisLocks", sop.RotationAxisLocks.ToString().ToLower()); 1523 writer.WriteElementString("RotationAxisLocks", sop.RotationAxisLocks.ToString().ToLower());
1503 writer.WriteElementString("PhysicsShapeType", sop.PhysicsShapeType.ToString().ToLower()); 1524 writer.WriteElementString("PhysicsShapeType", sop.PhysicsShapeType.ToString().ToLower());