diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 28 |
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 3a08271..2b0e115 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 |
@@ -1217,6 +1230,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1217 | writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString()); | 1230 | writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString()); |
1218 | writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString()); | 1231 | writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString()); |
1219 | 1232 | ||
1233 | writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString()); | ||
1234 | writer.WriteElementString("VolumeDetectActive", sop.VolumeDetectActive.ToString().ToLower()); | ||
1235 | |||
1220 | writer.WriteEndElement(); | 1236 | writer.WriteEndElement(); |
1221 | } | 1237 | } |
1222 | 1238 | ||
@@ -1506,12 +1522,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1506 | { | 1522 | { |
1507 | TaskInventoryDictionary tinv = new TaskInventoryDictionary(); | 1523 | TaskInventoryDictionary tinv = new TaskInventoryDictionary(); |
1508 | 1524 | ||
1509 | if (reader.IsEmptyElement) | ||
1510 | { | ||
1511 | reader.Read(); | ||
1512 | return tinv; | ||
1513 | } | ||
1514 | |||
1515 | reader.ReadStartElement(name, String.Empty); | 1525 | reader.ReadStartElement(name, String.Empty); |
1516 | 1526 | ||
1517 | while (reader.Name == "TaskInventoryItem") | 1527 | while (reader.Name == "TaskInventoryItem") |
@@ -1554,12 +1564,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1554 | 1564 | ||
1555 | PrimitiveBaseShape shape = new PrimitiveBaseShape(); | 1565 | PrimitiveBaseShape shape = new PrimitiveBaseShape(); |
1556 | 1566 | ||
1557 | if (reader.IsEmptyElement) | ||
1558 | { | ||
1559 | reader.Read(); | ||
1560 | return shape; | ||
1561 | } | ||
1562 | |||
1563 | reader.ReadStartElement(name, String.Empty); // Shape | 1567 | reader.ReadStartElement(name, String.Empty); // Shape |
1564 | 1568 | ||
1565 | string nodeName = string.Empty; | 1569 | string nodeName = string.Empty; |