Serialize the Volume Detect field

avinationmerge
Melanie 2011-12-05 19:33:25 +01:00
parent 1ece4feccd
commit 6362df1202
2 changed files with 9 additions and 3 deletions

View File

@ -220,8 +220,7 @@ namespace OpenSim.Region.Framework.Scenes
public Vector3 RotationAxis = Vector3.One; public Vector3 RotationAxis = Vector3.One;
public bool VolumeDetectActive; // XmlIgnore set to avoid problems with persistance until I come to care for this public bool VolumeDetectActive;
// Certainly this must be a persistant setting finally
public bool IsWaitingForFirstSpinUpdatePacket; public bool IsWaitingForFirstSpinUpdatePacket;

View File

@ -347,6 +347,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
m_SOPXmlProcessors.Add("PayPrice4", ProcessPayPrice4); m_SOPXmlProcessors.Add("PayPrice4", ProcessPayPrice4);
m_SOPXmlProcessors.Add("Buoyancy", ProcessBuoyancy); m_SOPXmlProcessors.Add("Buoyancy", ProcessBuoyancy);
m_SOPXmlProcessors.Add("VolumeDetectActive", ProcessVolumeDetectActive);
#endregion #endregion
#region TaskInventoryXmlProcessors initialization #region TaskInventoryXmlProcessors initialization
@ -736,6 +737,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
obj.Buoyancy = (int)reader.ReadElementContentAsFloat("Buoyancy", String.Empty); obj.Buoyancy = (int)reader.ReadElementContentAsFloat("Buoyancy", String.Empty);
} }
private static void ProcessVolumeDetectActive(SceneObjectPart obj, XmlTextReader reader)
{
obj.VolumeDetectActive = Util.ReadBoolean(reader);
}
#endregion #endregion
#region TaskInventoryXmlProcessors #region TaskInventoryXmlProcessors
@ -1220,6 +1226,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString()); writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString());
writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString()); writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString());
writer.WriteElementString("VolumeDetectActive", sop.VolumeDetectActive.ToString().ToLower());
writer.WriteEndElement(); writer.WriteEndElement();
} }