add axis locks to sop serializer. Now they are also saved to inventory
parent
3c69071145
commit
d8528a7ba0
|
@ -455,6 +455,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
|
|
||||||
m_SOPXmlProcessors.Add("Vehicle", ProcessVehicle);
|
m_SOPXmlProcessors.Add("Vehicle", ProcessVehicle);
|
||||||
|
|
||||||
|
m_SOPXmlProcessors.Add("RotationAxisLocks", ProcessRotationAxisLocks);
|
||||||
m_SOPXmlProcessors.Add("PhysicsShapeType", ProcessPhysicsShapeType);
|
m_SOPXmlProcessors.Add("PhysicsShapeType", ProcessPhysicsShapeType);
|
||||||
m_SOPXmlProcessors.Add("Density", ProcessDensity);
|
m_SOPXmlProcessors.Add("Density", ProcessDensity);
|
||||||
m_SOPXmlProcessors.Add("Friction", ProcessFriction);
|
m_SOPXmlProcessors.Add("Friction", ProcessFriction);
|
||||||
|
@ -697,6 +698,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
obj.ClickAction = (byte)reader.ReadElementContentAsInt("ClickAction", String.Empty);
|
obj.ClickAction = (byte)reader.ReadElementContentAsInt("ClickAction", String.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void ProcessRotationAxisLocks(SceneObjectPart obj, XmlReader reader)
|
||||||
|
{
|
||||||
|
obj.RotationAxisLocks = (byte)reader.ReadElementContentAsInt("RotationAxisLocks", String.Empty);
|
||||||
|
}
|
||||||
|
|
||||||
private static void ProcessPhysicsShapeType(SceneObjectPart obj, XmlReader reader)
|
private static void ProcessPhysicsShapeType(SceneObjectPart obj, XmlReader reader)
|
||||||
{
|
{
|
||||||
obj.PhysicsShapeType = (byte)reader.ReadElementContentAsInt("PhysicsShapeType", String.Empty);
|
obj.PhysicsShapeType = (byte)reader.ReadElementContentAsInt("PhysicsShapeType", String.Empty);
|
||||||
|
@ -1483,6 +1489,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
if (sop.VehicleParams != null)
|
if (sop.VehicleParams != null)
|
||||||
sop.VehicleParams.ToXml2(writer);
|
sop.VehicleParams.ToXml2(writer);
|
||||||
|
|
||||||
|
if(sop.RotationAxisLocks != 0)
|
||||||
|
writer.WriteElementString("RotationAxisLocks", sop.RotationAxisLocks.ToString().ToLower());
|
||||||
writer.WriteElementString("PhysicsShapeType", sop.PhysicsShapeType.ToString().ToLower());
|
writer.WriteElementString("PhysicsShapeType", sop.PhysicsShapeType.ToString().ToLower());
|
||||||
if (sop.Density != 1000.0f)
|
if (sop.Density != 1000.0f)
|
||||||
writer.WriteElementString("Density", sop.Density.ToString().ToLower());
|
writer.WriteElementString("Density", sop.Density.ToString().ToLower());
|
||||||
|
|
Loading…
Reference in New Issue