diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index e223f47..2372d6b 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -623,20 +623,19 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
623 | 623 | ||
624 | private static void ProcessVehicle(SceneObjectPart obj, XmlTextReader reader) | 624 | private static void ProcessVehicle(SceneObjectPart obj, XmlTextReader reader) |
625 | { | 625 | { |
626 | bool errors = false; | 626 | SOPVehicle vehicle = SOPVehicle.FromXml2(reader); |
627 | SOPVehicle _vehicle = new SOPVehicle(); | ||
628 | 627 | ||
629 | _vehicle.FromXml2(reader, out errors); | 628 | if (vehicle == null) |
630 | |||
631 | if (errors) | ||
632 | { | 629 | { |
633 | obj.sopVehicle = null; | 630 | obj.VehicleParams = null; |
634 | m_log.DebugFormat( | 631 | m_log.DebugFormat( |
635 | "[SceneObjectSerializer]: Parsing Vehicle for object part {0} {1} encountered errors. Please see earlier log entries.", | 632 | "[SceneObjectSerializer]: Parsing Vehicle for object part {0} {1} encountered errors. Please see earlier log entries.", |
636 | obj.Name, obj.UUID); | 633 | obj.Name, obj.UUID); |
637 | } | 634 | } |
638 | else | 635 | else |
639 | obj.sopVehicle = _vehicle; | 636 | { |
637 | obj.VehicleParams = vehicle; | ||
638 | } | ||
640 | } | 639 | } |
641 | 640 | ||
642 | private static void ProcessShape(SceneObjectPart obj, XmlTextReader reader) | 641 | private static void ProcessShape(SceneObjectPart obj, XmlTextReader reader) |
@@ -1325,8 +1324,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1325 | 1324 | ||
1326 | writer.WriteElementString("VolumeDetectActive", sop.VolumeDetectActive.ToString().ToLower()); | 1325 | writer.WriteElementString("VolumeDetectActive", sop.VolumeDetectActive.ToString().ToLower()); |
1327 | 1326 | ||
1328 | if (sop.sopVehicle != null) | 1327 | if (sop.VehicleParams != null) |
1329 | sop.sopVehicle.ToXml2(writer); | 1328 | sop.VehicleParams.ToXml2(writer); |
1330 | 1329 | ||
1331 | if(sop.PhysicsShapeType != sop.DefaultPhysicsShapeType()) | 1330 | if(sop.PhysicsShapeType != sop.DefaultPhysicsShapeType()) |
1332 | writer.WriteElementString("PhysicsShapeType", sop.PhysicsShapeType.ToString().ToLower()); | 1331 | writer.WriteElementString("PhysicsShapeType", sop.PhysicsShapeType.ToString().ToLower()); |