Merge branch 'master' of /var/git/opensim/
commit
5110366baf
|
@ -1438,10 +1438,21 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
Quaternion quat;
|
Quaternion quat;
|
||||||
|
|
||||||
reader.ReadStartElement(name);
|
reader.ReadStartElement(name);
|
||||||
|
if (reader.Name == "X") // assume X, Y, Z, W order
|
||||||
|
{
|
||||||
quat.X = reader.ReadElementContentAsFloat("X", String.Empty);
|
quat.X = reader.ReadElementContentAsFloat("X", String.Empty);
|
||||||
quat.Y = reader.ReadElementContentAsFloat("Y", String.Empty);
|
quat.Y = reader.ReadElementContentAsFloat("Y", String.Empty);
|
||||||
quat.Z = reader.ReadElementContentAsFloat("Z", String.Empty);
|
quat.Z = reader.ReadElementContentAsFloat("Z", String.Empty);
|
||||||
quat.W = reader.ReadElementContentAsFloat("W", 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;
|
||||||
|
|
Loading…
Reference in New Issue