aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs1
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs39
2 files changed, 40 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index befda0e..288cbee 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -656,6 +656,7 @@ namespace OpenSim.Region.Environment.Scenes
656 int primCount = 0; 656 int primCount = 0;
657 if ((fileName.StartsWith("http:")) | (File.Exists(fileName))) 657 if ((fileName.StartsWith("http:")) | (File.Exists(fileName)))
658 { 658 {
659
659 XmlTextReader reader = new XmlTextReader(fileName); 660 XmlTextReader reader = new XmlTextReader(fileName);
660 reader.WhitespaceHandling = WhitespaceHandling.None; 661 reader.WhitespaceHandling = WhitespaceHandling.None;
661 doc.Load(reader); 662 doc.Load(reader);
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 5989879..5ff0d72 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -234,6 +234,45 @@ namespace OpenSim.Region.Environment.Scenes
234 ScheduleGroupForFullUpdate(); 234 ScheduleGroupForFullUpdate();
235 } 235 }
236 236
237 /// <summary>
238 ///
239 /// </summary>
240 public SceneObjectGroup(string xmlData)
241 {
242 StringReader sr = new StringReader(xmlData);
243 XmlTextReader reader = new XmlTextReader(sr);
244 reader.Read();
245 reader.ReadStartElement("SceneObjectGroup");
246 reader.ReadStartElement("RootPart");
247 m_rootPart = SceneObjectPart.FromXml(reader);
248 reader.ReadEndElement();
249
250 while (reader.Read())
251 {
252 switch (reader.NodeType)
253 {
254 case XmlNodeType.Element:
255 if (reader.Name == "Part")
256 {
257 reader.Read();
258 SceneObjectPart Part = SceneObjectPart.FromXml(reader);
259 AddPart(Part);
260 }
261 break;
262 case XmlNodeType.EndElement:
263 break;
264 }
265 }
266 reader.Close();
267 sr.Close();
268 m_rootPart.SetParent(this);
269 m_parts.Add(m_rootPart.UUID, m_rootPart);
270 m_rootPart.ParentID = 0;
271 UpdateParentIDs();
272
273 ScheduleGroupForFullUpdate();
274 }
275
237 private void AttachToBackup() 276 private void AttachToBackup()
238 { 277 {
239 if (InSceneBackup) 278 if (InSceneBackup)