diff options
author | UbitUmarov | 2015-10-20 18:37:24 +0100 |
---|---|---|
committer | UbitUmarov | 2015-10-20 18:37:24 +0100 |
commit | d8528a7ba0edf0f6048c59421054ed8c0b85f86c (patch) | |
tree | bca809295b911977b85737bff864f899cd12e56b | |
parent | also apply axis locks, when creating a prim physics actor (diff) | |
download | opensim-SC-d8528a7ba0edf0f6048c59421054ed8c0b85f86c.zip opensim-SC-d8528a7ba0edf0f6048c59421054ed8c0b85f86c.tar.gz opensim-SC-d8528a7ba0edf0f6048c59421054ed8c0b85f86c.tar.bz2 opensim-SC-d8528a7ba0edf0f6048c59421054ed8c0b85f86c.tar.xz |
add axis locks to sop serializer. Now they are also saved to inventory
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index c8a01a0..7d3a168 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -455,6 +455,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
455 | 455 | ||
456 | m_SOPXmlProcessors.Add("Vehicle", ProcessVehicle); | 456 | m_SOPXmlProcessors.Add("Vehicle", ProcessVehicle); |
457 | 457 | ||
458 | m_SOPXmlProcessors.Add("RotationAxisLocks", ProcessRotationAxisLocks); | ||
458 | m_SOPXmlProcessors.Add("PhysicsShapeType", ProcessPhysicsShapeType); | 459 | m_SOPXmlProcessors.Add("PhysicsShapeType", ProcessPhysicsShapeType); |
459 | m_SOPXmlProcessors.Add("Density", ProcessDensity); | 460 | m_SOPXmlProcessors.Add("Density", ProcessDensity); |
460 | m_SOPXmlProcessors.Add("Friction", ProcessFriction); | 461 | m_SOPXmlProcessors.Add("Friction", ProcessFriction); |
@@ -697,6 +698,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
697 | obj.ClickAction = (byte)reader.ReadElementContentAsInt("ClickAction", String.Empty); | 698 | obj.ClickAction = (byte)reader.ReadElementContentAsInt("ClickAction", String.Empty); |
698 | } | 699 | } |
699 | 700 | ||
701 | private static void ProcessRotationAxisLocks(SceneObjectPart obj, XmlReader reader) | ||
702 | { | ||
703 | obj.RotationAxisLocks = (byte)reader.ReadElementContentAsInt("RotationAxisLocks", String.Empty); | ||
704 | } | ||
705 | |||
700 | private static void ProcessPhysicsShapeType(SceneObjectPart obj, XmlReader reader) | 706 | private static void ProcessPhysicsShapeType(SceneObjectPart obj, XmlReader reader) |
701 | { | 707 | { |
702 | obj.PhysicsShapeType = (byte)reader.ReadElementContentAsInt("PhysicsShapeType", String.Empty); | 708 | obj.PhysicsShapeType = (byte)reader.ReadElementContentAsInt("PhysicsShapeType", String.Empty); |
@@ -1483,6 +1489,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1483 | if (sop.VehicleParams != null) | 1489 | if (sop.VehicleParams != null) |
1484 | sop.VehicleParams.ToXml2(writer); | 1490 | sop.VehicleParams.ToXml2(writer); |
1485 | 1491 | ||
1492 | if(sop.RotationAxisLocks != 0) | ||
1493 | writer.WriteElementString("RotationAxisLocks", sop.RotationAxisLocks.ToString().ToLower()); | ||
1486 | writer.WriteElementString("PhysicsShapeType", sop.PhysicsShapeType.ToString().ToLower()); | 1494 | writer.WriteElementString("PhysicsShapeType", sop.PhysicsShapeType.ToString().ToLower()); |
1487 | if (sop.Density != 1000.0f) | 1495 | if (sop.Density != 1000.0f) |
1488 | writer.WriteElementString("Density", sop.Density.ToString().ToLower()); | 1496 | writer.WriteElementString("Density", sop.Density.ToString().ToLower()); |