aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Serialization
diff options
context:
space:
mode:
authorUbitUmarov2012-02-19 18:10:00 +0000
committerUbitUmarov2012-02-19 18:10:00 +0000
commit60d68ee3122a974007adec6e651fad461d8abda4 (patch)
tree94908ebd64cd2bf5735f3a57c3510c8eac37d0c4 /OpenSim/Region/Framework/Scenes/Serialization
parent moved vehicle from SOG to SOP (diff)
downloadopensim-SC_OLD-60d68ee3122a974007adec6e651fad461d8abda4.zip
opensim-SC_OLD-60d68ee3122a974007adec6e651fad461d8abda4.tar.gz
opensim-SC_OLD-60d68ee3122a974007adec6e651fad461d8abda4.tar.bz2
opensim-SC_OLD-60d68ee3122a974007adec6e651fad461d8abda4.tar.xz
Vehicle XML serialization more complete. Inactived by coments in SceneObjectSerializar.cs until proper testing
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs28
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 4b80e37..eaf32b8 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -349,6 +349,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
349 349
350 m_SOPXmlProcessors.Add("Buoyancy", ProcessBuoyancy); 350 m_SOPXmlProcessors.Add("Buoyancy", ProcessBuoyancy);
351 m_SOPXmlProcessors.Add("VolumeDetectActive", ProcessVolumeDetectActive); 351 m_SOPXmlProcessors.Add("VolumeDetectActive", ProcessVolumeDetectActive);
352
353 //Ubit comented until proper testing
354 // m_SOPXmlProcessors.Add("Vehicle", ProcessVehicle);
355
356
352 #endregion 357 #endregion
353 358
354 #region TaskInventoryXmlProcessors initialization 359 #region TaskInventoryXmlProcessors initialization
@@ -571,6 +576,25 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
571 obj.ClickAction = (byte)reader.ReadElementContentAsInt("ClickAction", String.Empty); 576 obj.ClickAction = (byte)reader.ReadElementContentAsInt("ClickAction", String.Empty);
572 } 577 }
573 578
579 private static void ProcessVehicle(SceneObjectPart obj, XmlTextReader reader)
580 {
581 bool errors = false;
582 SOPVehicle _vehicle = new SOPVehicle();
583
584 _vehicle.FromXml2(reader, out errors);
585
586 if (errors)
587 {
588 obj.sopVehicle = null;
589 m_log.DebugFormat(
590 "[SceneObjectSerializer]: Parsing Vehicle for object part {0} {1} encountered errors. Please see earlier log entries.",
591 obj.Name, obj.UUID);
592 }
593 else
594 obj.sopVehicle = _vehicle;
595 }
596
597
574 private static void ProcessShape(SceneObjectPart obj, XmlTextReader reader) 598 private static void ProcessShape(SceneObjectPart obj, XmlTextReader reader)
575 { 599 {
576 bool errors = false; 600 bool errors = false;
@@ -1231,6 +1255,10 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1231 writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString()); 1255 writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString());
1232 writer.WriteElementString("VolumeDetectActive", sop.VolumeDetectActive.ToString().ToLower()); 1256 writer.WriteElementString("VolumeDetectActive", sop.VolumeDetectActive.ToString().ToLower());
1233 1257
1258 //Ubit comented until proper testing
1259 // if (sop.sopVehicle != null)
1260 // sop.sopVehicle.ToXml2(writer);
1261
1234 writer.WriteEndElement(); 1262 writer.WriteEndElement();
1235 } 1263 }
1236 1264