diff options
author | UbitUmarov | 2012-02-25 22:20:25 +0000 |
---|---|---|
committer | UbitUmarov | 2012-02-25 22:20:25 +0000 |
commit | e07440d0c53fdc8e90f4887242e3b21049a729c0 (patch) | |
tree | cba4154ec1678c27aa9b4adf1c9a80088554dac1 /OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |
parent | Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff) | |
download | opensim-SC-e07440d0c53fdc8e90f4887242e3b21049a729c0.zip opensim-SC-e07440d0c53fdc8e90f4887242e3b21049a729c0.tar.gz opensim-SC-e07440d0c53fdc8e90f4887242e3b21049a729c0.tar.bz2 opensim-SC-e07440d0c53fdc8e90f4887242e3b21049a729c0.tar.xz |
changed SOP Force and Torque, adding XML (de/)serialization, also changed Buoyance. PLEASE trap deserialization from inventory etc, making force and torque vector3.Zero, unless we want then to rez moving. (needs checking/testing as usual)
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 72a0ec3..ed761da 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -349,6 +349,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
349 | m_SOPXmlProcessors.Add("PayPrice4", ProcessPayPrice4); | 349 | m_SOPXmlProcessors.Add("PayPrice4", ProcessPayPrice4); |
350 | 350 | ||
351 | m_SOPXmlProcessors.Add("Buoyancy", ProcessBuoyancy); | 351 | m_SOPXmlProcessors.Add("Buoyancy", ProcessBuoyancy); |
352 | m_SOPXmlProcessors.Add("Force", ProcessForce); | ||
353 | m_SOPXmlProcessors.Add("Torque", ProcessTorque); | ||
352 | m_SOPXmlProcessors.Add("VolumeDetectActive", ProcessVolumeDetectActive); | 354 | m_SOPXmlProcessors.Add("VolumeDetectActive", ProcessVolumeDetectActive); |
353 | 355 | ||
354 | //Ubit comented until proper testing | 356 | //Ubit comented until proper testing |
@@ -762,7 +764,16 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
762 | 764 | ||
763 | private static void ProcessBuoyancy(SceneObjectPart obj, XmlTextReader reader) | 765 | private static void ProcessBuoyancy(SceneObjectPart obj, XmlTextReader reader) |
764 | { | 766 | { |
765 | obj.Buoyancy = (int)reader.ReadElementContentAsFloat("Buoyancy", String.Empty); | 767 | obj.Buoyancy = (float)reader.ReadElementContentAsFloat("Buoyancy", String.Empty); |
768 | } | ||
769 | |||
770 | private static void ProcessForce(SceneObjectPart obj, XmlTextReader reader) | ||
771 | { | ||
772 | obj.Force = Util.ReadVector(reader, "Force"); | ||
773 | } | ||
774 | private static void ProcessTorque(SceneObjectPart obj, XmlTextReader reader) | ||
775 | { | ||
776 | obj.Torque = Util.ReadVector(reader, "Torque"); | ||
766 | } | 777 | } |
767 | 778 | ||
768 | private static void ProcessVolumeDetectActive(SceneObjectPart obj, XmlTextReader reader) | 779 | private static void ProcessVolumeDetectActive(SceneObjectPart obj, XmlTextReader reader) |
@@ -1256,6 +1267,10 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1256 | writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString()); | 1267 | writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString()); |
1257 | 1268 | ||
1258 | writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString()); | 1269 | writer.WriteElementString("Buoyancy", sop.Buoyancy.ToString()); |
1270 | |||
1271 | WriteVector(writer, "Force", sop.Force); | ||
1272 | WriteVector(writer, "Torque", sop.Torque); | ||
1273 | |||
1259 | writer.WriteElementString("VolumeDetectActive", sop.VolumeDetectActive.ToString().ToLower()); | 1274 | writer.WriteElementString("VolumeDetectActive", sop.VolumeDetectActive.ToString().ToLower()); |
1260 | 1275 | ||
1261 | //Ubit comented until proper testing | 1276 | //Ubit comented until proper testing |