aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authoropensim mirror account2010-10-19 15:10:03 -0700
committeropensim mirror account2010-10-19 15:10:03 -0700
commitd95982137abdb5865befe078577d3856b3f5e7f1 (patch)
treebe17b78bb0d1195ab53cfde7b822473ced836ef0 /OpenSim
parentMerge branch 'master' of /var/git/opensim/ (diff)
parentAnother take related to the previous commit. (diff)
downloadopensim-SC_OLD-d95982137abdb5865befe078577d3856b3f5e7f1.zip
opensim-SC_OLD-d95982137abdb5865befe078577d3856b3f5e7f1.tar.gz
opensim-SC_OLD-d95982137abdb5865befe078577d3856b3f5e7f1.tar.bz2
opensim-SC_OLD-d95982137abdb5865befe078577d3856b3f5e7f1.tar.xz
Merge branch 'master' of /var/git/opensim/
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs30
1 files changed, 17 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 3a48299..58ec8a6 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -1435,22 +1435,26 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1435 1435
1436 static Quaternion ReadQuaternion(XmlTextReader reader, string name) 1436 static Quaternion ReadQuaternion(XmlTextReader reader, string name)
1437 { 1437 {
1438 Quaternion quat; 1438 Quaternion quat = new Quaternion();
1439 1439
1440 reader.ReadStartElement(name); 1440 reader.ReadStartElement(name);
1441 if (reader.Name == "X") // assume X, Y, Z, W order 1441 while (reader.NodeType != XmlNodeType.EndElement)
1442 {
1443 quat.X = reader.ReadElementContentAsFloat("X", 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 { 1442 {
1450 quat.W = reader.ReadElementContentAsFloat("w", String.Empty); 1443 switch (reader.Name.ToLower())
1451 quat.X = reader.ReadElementContentAsFloat("x", String.Empty); 1444 {
1452 quat.Y = reader.ReadElementContentAsFloat("y", String.Empty); 1445 case "x":
1453 quat.Z = reader.ReadElementContentAsFloat("z", String.Empty); 1446 quat.X = reader.ReadElementContentAsFloat(reader.Name, String.Empty);
1447 break;
1448 case "y":
1449 quat.Y = reader.ReadElementContentAsFloat(reader.Name, String.Empty);
1450 break;
1451 case "z":
1452 quat.Z = reader.ReadElementContentAsFloat(reader.Name, String.Empty);
1453 break;
1454 case "w":
1455 quat.W = reader.ReadElementContentAsFloat(reader.Name, String.Empty);
1456 break;
1457 }
1454 } 1458 }
1455 1459
1456 reader.ReadEndElement(); 1460 reader.ReadEndElement();