aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs28
1 files changed, 16 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index b54fcb7..6303cb1 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -345,6 +345,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
345 m_SOPXmlProcessors.Add("PayPrice2", ProcessPayPrice2); 345 m_SOPXmlProcessors.Add("PayPrice2", ProcessPayPrice2);
346 m_SOPXmlProcessors.Add("PayPrice3", ProcessPayPrice3); 346 m_SOPXmlProcessors.Add("PayPrice3", ProcessPayPrice3);
347 m_SOPXmlProcessors.Add("PayPrice4", ProcessPayPrice4); 347 m_SOPXmlProcessors.Add("PayPrice4", ProcessPayPrice4);
348
349 m_SOPXmlProcessors.Add("Buoyancy", ProcessBuoyancy);
350 m_SOPXmlProcessors.Add("VolumeDetectActive", ProcessVolumeDetectActive);
348 #endregion 351 #endregion
349 352
350 #region TaskInventoryXmlProcessors initialization 353 #region TaskInventoryXmlProcessors initialization
@@ -729,6 +732,16 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
729 obj.PayPrice[4] = (int)reader.ReadElementContentAsInt("PayPrice4", String.Empty); 732 obj.PayPrice[4] = (int)reader.ReadElementContentAsInt("PayPrice4", String.Empty);
730 } 733 }
731 734
735 private static void ProcessBuoyancy(SceneObjectPart obj, XmlTextReader reader)
736 {
737 obj.Buoyancy = (int)reader.ReadElementContentAsFloat("Buoyancy", String.Empty);
738 }
739
740 private static void ProcessVolumeDetectActive(SceneObjectPart obj, XmlTextReader reader)
741 {
742 obj.VolumeDetectActive = Util.ReadBoolean(reader);
743 }
744
732 #endregion 745 #endregion
733 746
734 #region TaskInventoryXmlProcessors 747 #region TaskInventoryXmlProcessors
@@ -1214,6 +1227,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1214 writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString()); 1227 writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString());
1215 writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString()); 1228 writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString());
1216 1229
1230 writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString());
1231 writer.WriteElementString("VolumeDetectActive", sop.VolumeDetectActive.ToString().ToLower());
1232
1217 writer.WriteEndElement(); 1233 writer.WriteEndElement();
1218 } 1234 }
1219 1235
@@ -1503,12 +1519,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1503 { 1519 {
1504 TaskInventoryDictionary tinv = new TaskInventoryDictionary(); 1520 TaskInventoryDictionary tinv = new TaskInventoryDictionary();
1505 1521
1506 if (reader.IsEmptyElement)
1507 {
1508 reader.Read();
1509 return tinv;
1510 }
1511
1512 reader.ReadStartElement(name, String.Empty); 1522 reader.ReadStartElement(name, String.Empty);
1513 1523
1514 while (reader.Name == "TaskInventoryItem") 1524 while (reader.Name == "TaskInventoryItem")
@@ -1551,12 +1561,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1551 1561
1552 PrimitiveBaseShape shape = new PrimitiveBaseShape(); 1562 PrimitiveBaseShape shape = new PrimitiveBaseShape();
1553 1563
1554 if (reader.IsEmptyElement)
1555 {
1556 reader.Read();
1557 return shape;
1558 }
1559
1560 reader.ReadStartElement(name, String.Empty); // Shape 1564 reader.ReadStartElement(name, String.Empty); // Shape
1561 1565
1562 string nodeName = string.Empty; 1566 string nodeName = string.Empty;