aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs35
1 files changed, 20 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 4961309..b4fcf8f 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -2222,6 +2222,8 @@ namespace OpenSim.Region.Framework.Scenes
2222 { 2222 {
2223 objlist = new List<SceneObjectGroup>(); 2223 objlist = new List<SceneObjectGroup>();
2224 veclist = new List<Vector3>(); 2224 veclist = new List<Vector3>();
2225 bbox = Vector3.Zero;
2226 offsetHeight = 0;
2225 2227
2226 string xmlData = Utils.BytesToString(assetData); 2228 string xmlData = Utils.BytesToString(assetData);
2227 2229
@@ -2237,9 +2239,12 @@ namespace OpenSim.Region.Framework.Scenes
2237 if (isSingleObject || isAttachment) 2239 if (isSingleObject || isAttachment)
2238 { 2240 {
2239 SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(reader); 2241 SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(reader);
2240 objlist.Add(g); 2242 if (g != null)
2241 veclist.Add(Vector3.Zero); 2243 {
2242 bbox = g.GetAxisAlignedBoundingBox(out offsetHeight); 2244 objlist.Add(g);
2245 veclist.Add(Vector3.Zero);
2246 bbox = g.GetAxisAlignedBoundingBox(out offsetHeight);
2247 }
2243 return true; 2248 return true;
2244 } 2249 }
2245 else 2250 else
@@ -2258,17 +2263,20 @@ namespace OpenSim.Region.Framework.Scenes
2258 foreach (XmlNode n in groups) 2263 foreach (XmlNode n in groups)
2259 { 2264 {
2260 SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml); 2265 SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml);
2261 objlist.Add(g); 2266 if (g != null)
2267 {
2268 objlist.Add(g);
2262 2269
2263 XmlElement el = (XmlElement)n; 2270 XmlElement el = (XmlElement)n;
2264 string rawX = el.GetAttribute("offsetx"); 2271 string rawX = el.GetAttribute("offsetx");
2265 string rawY = el.GetAttribute("offsety"); 2272 string rawY = el.GetAttribute("offsety");
2266 string rawZ = el.GetAttribute("offsetz"); 2273 string rawZ = el.GetAttribute("offsetz");
2267 2274
2268 float x = Convert.ToSingle(rawX); 2275 float x = Convert.ToSingle(rawX);
2269 float y = Convert.ToSingle(rawY); 2276 float y = Convert.ToSingle(rawY);
2270 float z = Convert.ToSingle(rawZ); 2277 float z = Convert.ToSingle(rawZ);
2271 veclist.Add(new Vector3(x, y, z)); 2278 veclist.Add(new Vector3(x, y, z));
2279 }
2272 } 2280 }
2273 2281
2274 return false; 2282 return false;
@@ -2281,9 +2289,6 @@ namespace OpenSim.Region.Framework.Scenes
2281 m_log.Error( 2289 m_log.Error(
2282 "[AGENT INVENTORY]: Deserialization of xml failed when looking for CoalescedObject tag. Exception ", 2290 "[AGENT INVENTORY]: Deserialization of xml failed when looking for CoalescedObject tag. Exception ",
2283 e); 2291 e);
2284
2285 bbox = Vector3.Zero;
2286 offsetHeight = 0;
2287 } 2292 }
2288 2293
2289 return true; 2294 return true;