Merge branch 'master' of /var/git/opensim/

viewer-2-initial-appearance
opensim mirror account 2010-10-19 14:40:08 -07:00
commit 5110366baf
1 changed files with 15 additions and 4 deletions

View File

@ -1438,10 +1438,21 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
Quaternion quat; Quaternion quat;
reader.ReadStartElement(name); reader.ReadStartElement(name);
quat.X = reader.ReadElementContentAsFloat("X", String.Empty); if (reader.Name == "X") // assume X, Y, Z, W order
quat.Y = reader.ReadElementContentAsFloat("Y", String.Empty); {
quat.Z = reader.ReadElementContentAsFloat("Z", String.Empty); quat.X = reader.ReadElementContentAsFloat("X", String.Empty);
quat.W = reader.ReadElementContentAsFloat("W", String.Empty); quat.Y = reader.ReadElementContentAsFloat("Y", String.Empty);
quat.Z = reader.ReadElementContentAsFloat("Z", String.Empty);
quat.W = reader.ReadElementContentAsFloat("W", String.Empty);
}
else // assume w, x, y, z
{
quat.W = reader.ReadElementContentAsFloat("w", String.Empty);
quat.X = reader.ReadElementContentAsFloat("x", String.Empty);
quat.Y = reader.ReadElementContentAsFloat("y", String.Empty);
quat.Z = reader.ReadElementContentAsFloat("z", String.Empty);
}
reader.ReadEndElement(); reader.ReadEndElement();
return quat; return quat;