aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Serialization
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs25
1 files changed, 11 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index c18c93a..d6e8223 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -102,7 +102,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
102 sceneObject.AddPart(part); 102 sceneObject.AddPart(part);
103 part.LinkNum = linkNum; 103 part.LinkNum = linkNum;
104 part.TrimPermissions(); 104 part.TrimPermissions();
105 part.StoreUndoState(); 105 part.StoreUndoState(UndoType.STATE_ALL);
106 reader.Close(); 106 reader.Close();
107 sr.Close(); 107 sr.Close();
108 } 108 }
@@ -236,7 +236,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
236 if (originalLinkNum != 0) 236 if (originalLinkNum != 0)
237 part.LinkNum = originalLinkNum; 237 part.LinkNum = originalLinkNum;
238 238
239 part.StoreUndoState(); 239 part.StoreUndoState(UndoType.STATE_ALL);
240 reader.Close(); 240 reader.Close();
241 sr.Close(); 241 sr.Close();
242 } 242 }
@@ -345,6 +345,8 @@ 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);
348 #endregion 350 #endregion
349 351
350 #region TaskInventoryXmlProcessors initialization 352 #region TaskInventoryXmlProcessors initialization
@@ -734,6 +736,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
734 obj.PayPrice[4] = (int)reader.ReadElementContentAsInt("PayPrice4", String.Empty); 736 obj.PayPrice[4] = (int)reader.ReadElementContentAsInt("PayPrice4", String.Empty);
735 } 737 }
736 738
739 private static void ProcessBuoyancy(SceneObjectPart obj, XmlTextReader reader)
740 {
741 obj.Buoyancy = (int)reader.ReadElementContentAsFloat("Buoyancy", String.Empty);
742 }
743
737 #endregion 744 #endregion
738 745
739 #region TaskInventoryXmlProcessors 746 #region TaskInventoryXmlProcessors
@@ -1218,6 +1225,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1218 writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString()); 1225 writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString());
1219 writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString()); 1226 writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString());
1220 1227
1228 writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString());
1229
1221 writer.WriteEndElement(); 1230 writer.WriteEndElement();
1222 } 1231 }
1223 1232
@@ -1502,12 +1511,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1502 { 1511 {
1503 TaskInventoryDictionary tinv = new TaskInventoryDictionary(); 1512 TaskInventoryDictionary tinv = new TaskInventoryDictionary();
1504 1513
1505 if (reader.IsEmptyElement)
1506 {
1507 reader.Read();
1508 return tinv;
1509 }
1510
1511 reader.ReadStartElement(name, String.Empty); 1514 reader.ReadStartElement(name, String.Empty);
1512 1515
1513 while (reader.Name == "TaskInventoryItem") 1516 while (reader.Name == "TaskInventoryItem")
@@ -1550,12 +1553,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1550 1553
1551 PrimitiveBaseShape shape = new PrimitiveBaseShape(); 1554 PrimitiveBaseShape shape = new PrimitiveBaseShape();
1552 1555
1553 if (reader.IsEmptyElement)
1554 {
1555 reader.Read();
1556 return shape;
1557 }
1558
1559 reader.ReadStartElement(name, String.Empty); // Shape 1556 reader.ReadStartElement(name, String.Empty); // Shape
1560 1557
1561 string nodeName = string.Empty; 1558 string nodeName = string.Empty;