Mantis #7536. This may alleviate the side effects of broken SceneObjects XML. It doesn't (can't) fix the cause.
parent
51fccff235
commit
83267e19f6
|
@ -2222,6 +2222,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
objlist = new List<SceneObjectGroup>();
|
objlist = new List<SceneObjectGroup>();
|
||||||
veclist = new List<Vector3>();
|
veclist = new List<Vector3>();
|
||||||
|
bbox = Vector3.Zero;
|
||||||
|
offsetHeight = 0;
|
||||||
|
|
||||||
string xmlData = Utils.BytesToString(assetData);
|
string xmlData = Utils.BytesToString(assetData);
|
||||||
|
|
||||||
|
@ -2237,9 +2239,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (isSingleObject || isAttachment)
|
if (isSingleObject || isAttachment)
|
||||||
{
|
{
|
||||||
SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(reader);
|
SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(reader);
|
||||||
objlist.Add(g);
|
if (g != null)
|
||||||
veclist.Add(Vector3.Zero);
|
{
|
||||||
bbox = g.GetAxisAlignedBoundingBox(out offsetHeight);
|
objlist.Add(g);
|
||||||
|
veclist.Add(Vector3.Zero);
|
||||||
|
bbox = g.GetAxisAlignedBoundingBox(out offsetHeight);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2258,17 +2263,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
foreach (XmlNode n in groups)
|
foreach (XmlNode n in groups)
|
||||||
{
|
{
|
||||||
SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml);
|
SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml);
|
||||||
objlist.Add(g);
|
if (g != null)
|
||||||
|
{
|
||||||
|
objlist.Add(g);
|
||||||
|
|
||||||
XmlElement el = (XmlElement)n;
|
XmlElement el = (XmlElement)n;
|
||||||
string rawX = el.GetAttribute("offsetx");
|
string rawX = el.GetAttribute("offsetx");
|
||||||
string rawY = el.GetAttribute("offsety");
|
string rawY = el.GetAttribute("offsety");
|
||||||
string rawZ = el.GetAttribute("offsetz");
|
string rawZ = el.GetAttribute("offsetz");
|
||||||
|
|
||||||
float x = Convert.ToSingle(rawX);
|
float x = Convert.ToSingle(rawX);
|
||||||
float y = Convert.ToSingle(rawY);
|
float y = Convert.ToSingle(rawY);
|
||||||
float z = Convert.ToSingle(rawZ);
|
float z = Convert.ToSingle(rawZ);
|
||||||
veclist.Add(new Vector3(x, y, z));
|
veclist.Add(new Vector3(x, y, z));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -2281,9 +2289,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_log.Error(
|
m_log.Error(
|
||||||
"[AGENT INVENTORY]: Deserialization of xml failed when looking for CoalescedObject tag. Exception ",
|
"[AGENT INVENTORY]: Deserialization of xml failed when looking for CoalescedObject tag. Exception ",
|
||||||
e);
|
e);
|
||||||
|
|
||||||
bbox = Vector3.Zero;
|
|
||||||
offsetHeight = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue