From 470019b52a72de1a8777933ce3254cde87e184f9 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 7 Jul 2012 19:59:55 +0200 Subject: Change semantics of FromXML on vehicle data to make the serializer a bit cleaner --- .../Framework/Scenes/Serialization/SceneObjectSerializer.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs') diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index c7e4c3e..abca14f 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -623,12 +623,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization private static void ProcessVehicle(SceneObjectPart obj, XmlTextReader reader) { - bool errors = false; - SOPVehicle _vehicle = new SOPVehicle(); + SOPVehicle vehicle = SOPVehicle.FromXml2(reader); - _vehicle.FromXml2(reader, out errors); - - if (errors) + if (vehicle == null) { obj.VehicleParams = null; m_log.DebugFormat( @@ -636,7 +633,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization obj.Name, obj.UUID); } else - obj.VehicleParams = _vehicle; + { + obj.VehicleParams = vehicle; + } } private static void ProcessShape(SceneObjectPart obj, XmlTextReader reader) -- cgit v1.1