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.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 fcf7e0c..9174070 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
@@ -1216,6 +1223,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1216 writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString()); 1223 writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString());
1217 writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString()); 1224 writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString());
1218 1225
1226 writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString());
1227
1219 writer.WriteEndElement(); 1228 writer.WriteEndElement();
1220 } 1229 }
1221 1230
@@ -1500,12 +1509,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1500 { 1509 {
1501 TaskInventoryDictionary tinv = new TaskInventoryDictionary(); 1510 TaskInventoryDictionary tinv = new TaskInventoryDictionary();
1502 1511
1503 if (reader.IsEmptyElement)
1504 {
1505 reader.Read();
1506 return tinv;
1507 }
1508
1509 reader.ReadStartElement(name, String.Empty); 1512 reader.ReadStartElement(name, String.Empty);
1510 1513
1511 while (reader.Name == "TaskInventoryItem") 1514 while (reader.Name == "TaskInventoryItem")
@@ -1548,12 +1551,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1548 1551
1549 PrimitiveBaseShape shape = new PrimitiveBaseShape(); 1552 PrimitiveBaseShape shape = new PrimitiveBaseShape();
1550 1553
1551 if (reader.IsEmptyElement)
1552 {
1553 reader.Read();
1554 return shape;
1555 }
1556
1557 reader.ReadStartElement(name, String.Empty); // Shape 1554 reader.ReadStartElement(name, String.Empty); // Shape
1558 1555
1559 string nodeName = string.Empty; 1556 string nodeName = string.Empty;