Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

bulletsim
Justin Clark-Casey (justincc) 2011-05-26 01:28:48 +01:00
commit d9889ae2e7
2 changed files with 40 additions and 6 deletions

View File

@ -144,11 +144,10 @@ namespace OpenSim.Region.Framework.Scenes
public Vector3 StatusSandboxPos;
// TODO: This needs to be persisted in next XML version update!
public readonly int[] PayPrice = {-2,-2,-2,-2,-2};
[XmlIgnore]
public int[] PayPrice = {-2,-2,-2,-2,-2};
[XmlIgnore]
public PhysicsActor PhysActor
{
get { return m_physActor; }

View File

@ -341,6 +341,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
m_SOPXmlProcessors.Add("MediaUrl", ProcessMediaUrl);
m_SOPXmlProcessors.Add("TextureAnimation", ProcessTextureAnimation);
m_SOPXmlProcessors.Add("ParticleSystem", ProcessParticleSystem);
m_SOPXmlProcessors.Add("PayPrice0", ProcessPayPrice0);
m_SOPXmlProcessors.Add("PayPrice1", ProcessPayPrice1);
m_SOPXmlProcessors.Add("PayPrice2", ProcessPayPrice2);
m_SOPXmlProcessors.Add("PayPrice3", ProcessPayPrice3);
m_SOPXmlProcessors.Add("PayPrice4", ProcessPayPrice4);
#endregion
#region TaskInventoryXmlProcessors initialization
@ -698,6 +703,32 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
{
obj.ParticleSystem = Convert.FromBase64String(reader.ReadElementContentAsString("ParticleSystem", String.Empty));
}
private static void ProcessPayPrice0(SceneObjectPart obj, XmlTextReader reader)
{
obj.PayPrice[0] = (int)reader.ReadElementContentAsInt("PayPrice0", String.Empty);
}
private static void ProcessPayPrice1(SceneObjectPart obj, XmlTextReader reader)
{
obj.PayPrice[1] = (int)reader.ReadElementContentAsInt("PayPrice1", String.Empty);
}
private static void ProcessPayPrice2(SceneObjectPart obj, XmlTextReader reader)
{
obj.PayPrice[2] = (int)reader.ReadElementContentAsInt("PayPrice2", String.Empty);
}
private static void ProcessPayPrice3(SceneObjectPart obj, XmlTextReader reader)
{
obj.PayPrice[3] = (int)reader.ReadElementContentAsInt("PayPrice3", String.Empty);
}
private static void ProcessPayPrice4(SceneObjectPart obj, XmlTextReader reader)
{
obj.PayPrice[4] = (int)reader.ReadElementContentAsInt("PayPrice4", String.Empty);
}
#endregion
#region TaskInventoryXmlProcessors
@ -1069,7 +1100,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
shp.Media = PrimitiveBaseShape.MediaList.FromXml(value);
}
#endregion
////////// Write /////////
@ -1175,6 +1205,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString());
WriteBytes(writer, "TextureAnimation", sop.TextureAnimation);
WriteBytes(writer, "ParticleSystem", sop.ParticleSystem);
writer.WriteElementString("PayPrice0", sop.PayPrice[0].ToString());
writer.WriteElementString("PayPrice1", sop.PayPrice[1].ToString());
writer.WriteElementString("PayPrice2", sop.PayPrice[2].ToString());
writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString());
writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString());
writer.WriteEndElement();
}