From 458a8c6d0b1c54e3d395c28605a5b6bce45881fd Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 2 Jun 2011 18:44:51 +0200 Subject: Persist Buoyancy in inventory --- .../Framework/Scenes/Serialization/SceneObjectSerializer.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index c42302f..95ded7f 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -346,6 +346,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization m_SOPXmlProcessors.Add("PayPrice2", ProcessPayPrice2); m_SOPXmlProcessors.Add("PayPrice3", ProcessPayPrice3); m_SOPXmlProcessors.Add("PayPrice4", ProcessPayPrice4); + + m_SOPXmlProcessors.Add("Buoyancy", ProcessBuoyancy); #endregion #region TaskInventoryXmlProcessors initialization @@ -729,6 +731,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization obj.PayPrice[4] = (int)reader.ReadElementContentAsInt("PayPrice4", String.Empty); } + private static void ProcessBuoyancy(SceneObjectPart obj, XmlTextReader reader) + { + obj.Buoyancy = (int)reader.ReadElementContentAsFloat("Buoyancy", String.Empty); + } + #endregion #region TaskInventoryXmlProcessors @@ -1211,6 +1218,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString()); writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString()); + writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString()); + writer.WriteEndElement(); } -- cgit v1.1