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.viewer-2-initial-appearance
parent
684449f783
commit
3b2d9a9939
|
@ -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