aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDiva Canto2010-10-19 14:37:03 -0700
committerDiva Canto2010-10-19 14:37:03 -0700
commit3b2d9a99390e44d99bf00a6be685c08e307b9e42 (patch)
treec0c32e9d37e42fbfe7d758d7ab8769eb36f9138a /OpenSim
parentAdded TextureAnimation and ParticleSystem to serialization. (diff)
downloadopensim-SC_OLD-3b2d9a99390e44d99bf00a6be685c08e307b9e42.zip
opensim-SC_OLD-3b2d9a99390e44d99bf00a6be685c08e307b9e42.tar.gz
opensim-SC_OLD-3b2d9a99390e44d99bf00a6be685c08e307b9e42.tar.bz2
opensim-SC_OLD-3b2d9a99390e44d99bf00a6be685c08e307b9e42.tar.xz
Added code to quaternion deserialization to try to cope with an exception seen in Wright Plaza related to SitTargetOrientation.
17:23:05 - [SceneObjectSerializer]: exception while parsing SitTargetOrientation: System.Xml.XmlException: Expecting X tag from namespace , got w and instead Line 1, position 30064.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs19
1 files changed, 15 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index b6aa31b..3a48299 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -1438,10 +1438,21 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1438 Quaternion quat; 1438 Quaternion quat;
1439 1439
1440 reader.ReadStartElement(name); 1440 reader.ReadStartElement(name);
1441 quat.X = reader.ReadElementContentAsFloat("X", String.Empty); 1441 if (reader.Name == "X") // assume X, Y, Z, W order
1442 quat.Y = reader.ReadElementContentAsFloat("Y", String.Empty); 1442 {
1443 quat.Z = reader.ReadElementContentAsFloat("Z", String.Empty); 1443 quat.X = reader.ReadElementContentAsFloat("X", String.Empty);
1444 quat.W = reader.ReadElementContentAsFloat("W", String.Empty); 1444 quat.Y = reader.ReadElementContentAsFloat("Y", String.Empty);
1445 quat.Z = reader.ReadElementContentAsFloat("Z", String.Empty);
1446 quat.W = reader.ReadElementContentAsFloat("W", String.Empty);
1447 }
1448 else // assume w, x, y, z
1449 {
1450 quat.W = reader.ReadElementContentAsFloat("w", String.Empty);
1451 quat.X = reader.ReadElementContentAsFloat("x", String.Empty);
1452 quat.Y = reader.ReadElementContentAsFloat("y", String.Empty);
1453 quat.Z = reader.ReadElementContentAsFloat("z", String.Empty);
1454 }
1455
1445 reader.ReadEndElement(); 1456 reader.ReadEndElement();
1446 1457
1447 return quat; 1458 return quat;