diff options
author | Melanie | 2011-06-02 18:44:51 +0200 |
---|---|---|
committer | Melanie | 2011-06-02 18:44:51 +0200 |
commit | 458a8c6d0b1c54e3d395c28605a5b6bce45881fd (patch) | |
tree | 0cb14ae1d8d44023f34071a174d8db5e5bda8a79 /OpenSim | |
parent | Make Buoyancy a prim property (diff) | |
download | opensim-SC-458a8c6d0b1c54e3d395c28605a5b6bce45881fd.zip opensim-SC-458a8c6d0b1c54e3d395c28605a5b6bce45881fd.tar.gz opensim-SC-458a8c6d0b1c54e3d395c28605a5b6bce45881fd.tar.bz2 opensim-SC-458a8c6d0b1c54e3d395c28605a5b6bce45881fd.tar.xz |
Persist Buoyancy in inventory
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 9 |
1 files changed, 9 insertions, 0 deletions
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 | |||
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); | ||
349 | #endregion | 351 | #endregion |
350 | 352 | ||
351 | #region TaskInventoryXmlProcessors initialization | 353 | #region TaskInventoryXmlProcessors initialization |
@@ -729,6 +731,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
729 | obj.PayPrice[4] = (int)reader.ReadElementContentAsInt("PayPrice4", String.Empty); | 731 | obj.PayPrice[4] = (int)reader.ReadElementContentAsInt("PayPrice4", String.Empty); |
730 | } | 732 | } |
731 | 733 | ||
734 | private static void ProcessBuoyancy(SceneObjectPart obj, XmlTextReader reader) | ||
735 | { | ||
736 | obj.Buoyancy = (int)reader.ReadElementContentAsFloat("Buoyancy", String.Empty); | ||
737 | } | ||
738 | |||
732 | #endregion | 739 | #endregion |
733 | 740 | ||
734 | #region TaskInventoryXmlProcessors | 741 | #region TaskInventoryXmlProcessors |
@@ -1211,6 +1218,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1211 | writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString()); | 1218 | writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString()); |
1212 | writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString()); | 1219 | writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString()); |
1213 | 1220 | ||
1221 | writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString()); | ||
1222 | |||
1214 | writer.WriteEndElement(); | 1223 | writer.WriteEndElement(); |
1215 | } | 1224 | } |
1216 | 1225 | ||