Persist Buoyancy in inventory

This commit is contained in:
Melanie
2011-06-02 18:44:51 +02:00
parent 61bf2bf2dd
commit 458a8c6d0b

View File

@@ -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();
}