diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 19 |
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; |