aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs62
1 files changed, 36 insertions, 26 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index e2ba681..38c7e45 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -296,36 +296,46 @@ namespace OpenSim.Region.Environment.Scenes
296 296
297 StringReader sr = new StringReader(xmlData); 297 StringReader sr = new StringReader(xmlData);
298 XmlTextReader reader = new XmlTextReader(sr); 298 XmlTextReader reader = new XmlTextReader(sr);
299 reader.Read(); 299 try
300 reader.ReadStartElement("SceneObjectGroup");
301 reader.ReadStartElement("RootPart");
302 m_rootPart = SceneObjectPart.FromXml(reader);
303 AddPart(m_rootPart);
304
305// m_log.DebugFormat("[SCENE OBJECT GROUP]: Current node {0}", reader.Name);
306
307 reader.ReadEndElement();
308
309 while (reader.Read())
310 { 300 {
311 switch (reader.NodeType) 301 reader.Read();
302 reader.ReadStartElement("SceneObjectGroup");
303 reader.ReadStartElement("RootPart");
304 m_rootPart = SceneObjectPart.FromXml(reader);
305 AddPart(m_rootPart);
306
307 m_log.DebugFormat("[SCENE OBJECT GROUP]: Current node {0}", reader.Name);
308
309 reader.ReadEndElement();
310
311 while (reader.Read())
312 { 312 {
313 case XmlNodeType.Element: 313 switch (reader.NodeType)
314 if (reader.Name == "Part") 314 {
315 { 315 case XmlNodeType.Element:
316 reader.Read(); 316 if (reader.Name == "Part")
317 SceneObjectPart part = SceneObjectPart.FromXml(reader); 317 {
318 part.LocalId = m_scene.PrimIDAllocate(); 318 reader.Read();
319 AddPart(part); 319 SceneObjectPart part = SceneObjectPart.FromXml(reader);
320 part.RegionHandle = m_regionHandle; 320 part.LocalId = m_scene.PrimIDAllocate();
321 321 AddPart(part);
322 part.TrimPermissions(); 322 part.RegionHandle = m_regionHandle;
323 } 323
324 break; 324 part.TrimPermissions();
325 case XmlNodeType.EndElement: 325 }
326 break; 326 break;
327 case XmlNodeType.EndElement:
328 break;
329 }
327 } 330 }
328 } 331 }
332 catch (XmlException e)
333 {
334 m_log.ErrorFormat("[SCENE OBJECT GROUP]: Deserialization of following xml failed, {0}", xmlData);
335
336 // Let's see if carrying on does anything for us
337 }
338
329 reader.Close(); 339 reader.Close();
330 sr.Close(); 340 sr.Close();
331 341