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 0a32214..4b80e37 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -346,6 +346,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
346 | m_SOPXmlProcessors.Add("PayPrice2", ProcessPayPrice2); | 346 | m_SOPXmlProcessors.Add("PayPrice2", ProcessPayPrice2); |
347 | m_SOPXmlProcessors.Add("PayPrice3", ProcessPayPrice3); | 347 | m_SOPXmlProcessors.Add("PayPrice3", ProcessPayPrice3); |
348 | m_SOPXmlProcessors.Add("PayPrice4", ProcessPayPrice4); | 348 | m_SOPXmlProcessors.Add("PayPrice4", ProcessPayPrice4); |
349 | |||
350 | m_SOPXmlProcessors.Add("Buoyancy", ProcessBuoyancy); | ||
351 | m_SOPXmlProcessors.Add("VolumeDetectActive", ProcessVolumeDetectActive); | ||
349 | #endregion | 352 | #endregion |
350 | 353 | ||
351 | #region TaskInventoryXmlProcessors initialization | 354 | #region TaskInventoryXmlProcessors initialization |
@@ -730,6 +733,16 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
730 | obj.PayPrice[4] = (int)reader.ReadElementContentAsInt("PayPrice4", String.Empty); | 733 | obj.PayPrice[4] = (int)reader.ReadElementContentAsInt("PayPrice4", String.Empty); |
731 | } | 734 | } |
732 | 735 | ||
736 | private static void ProcessBuoyancy(SceneObjectPart obj, XmlTextReader reader) | ||
737 | { | ||
738 | obj.Buoyancy = (int)reader.ReadElementContentAsFloat("Buoyancy", String.Empty); | ||
739 | } | ||
740 | |||
741 | private static void ProcessVolumeDetectActive(SceneObjectPart obj, XmlTextReader reader) | ||
742 | { | ||
743 | obj.VolumeDetectActive = Util.ReadBoolean(reader); | ||
744 | } | ||
745 | |||
733 | #endregion | 746 | #endregion |
734 | 747 | ||
735 | #region TaskInventoryXmlProcessors | 748 | #region TaskInventoryXmlProcessors |
@@ -1215,6 +1228,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1215 | writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString()); | 1228 | writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString()); |
1216 | writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString()); | 1229 | writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString()); |
1217 | 1230 | ||
1231 | writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString()); | ||
1232 | writer.WriteElementString("VolumeDetectActive", sop.VolumeDetectActive.ToString().ToLower()); | ||
1233 | |||
1218 | writer.WriteEndElement(); | 1234 | writer.WriteEndElement(); |
1219 | } | 1235 | } |
1220 | 1236 | ||
@@ -1484,12 +1500,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1484 | { | 1500 | { |
1485 | TaskInventoryDictionary tinv = new TaskInventoryDictionary(); | 1501 | TaskInventoryDictionary tinv = new TaskInventoryDictionary(); |
1486 | 1502 | ||
1487 | if (reader.IsEmptyElement) | ||
1488 | { | ||
1489 | reader.Read(); | ||
1490 | return tinv; | ||
1491 | } | ||
1492 | |||
1493 | reader.ReadStartElement(name, String.Empty); | 1503 | reader.ReadStartElement(name, String.Empty); |
1494 | 1504 | ||
1495 | while (reader.Name == "TaskInventoryItem") | 1505 | while (reader.Name == "TaskInventoryItem") |
@@ -1527,12 +1537,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1527 | 1537 | ||
1528 | PrimitiveBaseShape shape = new PrimitiveBaseShape(); | 1538 | PrimitiveBaseShape shape = new PrimitiveBaseShape(); |
1529 | 1539 | ||
1530 | if (reader.IsEmptyElement) | ||
1531 | { | ||
1532 | reader.Read(); | ||
1533 | return shape; | ||
1534 | } | ||
1535 | |||
1536 | reader.ReadStartElement(name, String.Empty); // Shape | 1540 | reader.ReadStartElement(name, String.Empty); // Shape |
1537 | 1541 | ||
1538 | errors = ExternalRepresentationUtils.ExecuteReadProcessors( | 1542 | errors = ExternalRepresentationUtils.ExecuteReadProcessors( |