Mantis #7536. This may alleviate the side effects of broken SceneObjects XML. It doesn't (can't) fix the cause.

fsassets
Diva Canto 2015-06-04 16:17:45 -07:00
parent 51fccff235
commit 83267e19f6
1 changed files with 20 additions and 15 deletions

View File

@ -2222,6 +2222,8 @@ namespace OpenSim.Region.Framework.Scenes
{
objlist = new List<SceneObjectGroup>();
veclist = new List<Vector3>();
bbox = Vector3.Zero;
offsetHeight = 0;
string xmlData = Utils.BytesToString(assetData);
@ -2237,9 +2239,12 @@ namespace OpenSim.Region.Framework.Scenes
if (isSingleObject || isAttachment)
{
SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(reader);
if (g != null)
{
objlist.Add(g);
veclist.Add(Vector3.Zero);
bbox = g.GetAxisAlignedBoundingBox(out offsetHeight);
}
return true;
}
else
@ -2258,6 +2263,8 @@ namespace OpenSim.Region.Framework.Scenes
foreach (XmlNode n in groups)
{
SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml);
if (g != null)
{
objlist.Add(g);
XmlElement el = (XmlElement)n;
@ -2270,6 +2277,7 @@ namespace OpenSim.Region.Framework.Scenes
float z = Convert.ToSingle(rawZ);
veclist.Add(new Vector3(x, y, z));
}
}
return false;
}
@ -2281,9 +2289,6 @@ namespace OpenSim.Region.Framework.Scenes
m_log.Error(
"[AGENT INVENTORY]: Deserialization of xml failed when looking for CoalescedObject tag. Exception ",
e);
bbox = Vector3.Zero;
offsetHeight = 0;
}
return true;