diff options
author | Melanie | 2012-02-19 20:24:00 +0100 |
---|---|---|
committer | Melanie | 2012-02-19 20:24:00 +0100 |
commit | 433d5f1d3e60438fcad9019fc6e7c0fd11386a8e (patch) | |
tree | 22a6bc8b9f1cdf4f230cbbbc3c5437a91c5a025e /OpenSim/Region/Framework/Scenes/Serialization | |
parent | Fix merge issues in prebuild (diff) | |
parent | simplified vehicle fromXml. Use still comented on SceneObjectSerialized.cs (diff) | |
download | opensim-SC_OLD-433d5f1d3e60438fcad9019fc6e7c0fd11386a8e.zip opensim-SC_OLD-433d5f1d3e60438fcad9019fc6e7c0fd11386a8e.tar.gz opensim-SC_OLD-433d5f1d3e60438fcad9019fc6e7c0fd11386a8e.tar.bz2 opensim-SC_OLD-433d5f1d3e60438fcad9019fc6e7c0fd11386a8e.tar.xz |
Merge branch 'ubitwork'
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 19cb9fb..9f6dabb 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -350,6 +350,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
350 | 350 | ||
351 | m_SOPXmlProcessors.Add("Buoyancy", ProcessBuoyancy); | 351 | m_SOPXmlProcessors.Add("Buoyancy", ProcessBuoyancy); |
352 | m_SOPXmlProcessors.Add("VolumeDetectActive", ProcessVolumeDetectActive); | 352 | m_SOPXmlProcessors.Add("VolumeDetectActive", ProcessVolumeDetectActive); |
353 | |||
354 | //Ubit comented until proper testing | ||
355 | // m_SOPXmlProcessors.Add("Vehicle", ProcessVehicle); | ||
356 | |||
357 | |||
353 | #endregion | 358 | #endregion |
354 | 359 | ||
355 | #region TaskInventoryXmlProcessors initialization | 360 | #region TaskInventoryXmlProcessors initialization |
@@ -572,6 +577,25 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
572 | obj.ClickAction = (byte)reader.ReadElementContentAsInt("ClickAction", String.Empty); | 577 | obj.ClickAction = (byte)reader.ReadElementContentAsInt("ClickAction", String.Empty); |
573 | } | 578 | } |
574 | 579 | ||
580 | private static void ProcessVehicle(SceneObjectPart obj, XmlTextReader reader) | ||
581 | { | ||
582 | bool errors = false; | ||
583 | SOPVehicle _vehicle = new SOPVehicle(); | ||
584 | |||
585 | _vehicle.FromXml2(reader, out errors); | ||
586 | |||
587 | if (errors) | ||
588 | { | ||
589 | obj.sopVehicle = null; | ||
590 | m_log.DebugFormat( | ||
591 | "[SceneObjectSerializer]: Parsing Vehicle for object part {0} {1} encountered errors. Please see earlier log entries.", | ||
592 | obj.Name, obj.UUID); | ||
593 | } | ||
594 | else | ||
595 | obj.sopVehicle = _vehicle; | ||
596 | } | ||
597 | |||
598 | |||
575 | private static void ProcessShape(SceneObjectPart obj, XmlTextReader reader) | 599 | private static void ProcessShape(SceneObjectPart obj, XmlTextReader reader) |
576 | { | 600 | { |
577 | List<string> errorNodeNames; | 601 | List<string> errorNodeNames; |
@@ -1234,6 +1258,10 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1234 | writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString()); | 1258 | writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString()); |
1235 | writer.WriteElementString("VolumeDetectActive", sop.VolumeDetectActive.ToString().ToLower()); | 1259 | writer.WriteElementString("VolumeDetectActive", sop.VolumeDetectActive.ToString().ToLower()); |
1236 | 1260 | ||
1261 | //Ubit comented until proper testing | ||
1262 | // if (sop.sopVehicle != null) | ||
1263 | // sop.sopVehicle.ToXml2(writer); | ||
1264 | |||
1237 | writer.WriteEndElement(); | 1265 | writer.WriteEndElement(); |
1238 | } | 1266 | } |
1239 | 1267 | ||