aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs17
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs3
2 files changed, 15 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 45db5f7..1603c52 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -311,8 +311,19 @@ namespace OpenSim.Region.Environment.Scenes
311 311
312 public string ToXmlString() 312 public string ToXmlString()
313 { 313 {
314 StringWriter sw = new StringWriter(); 314 using (StringWriter sw = new StringWriter())
315 XmlTextWriter writer = new XmlTextWriter(sw); 315 {
316 using (XmlTextWriter writer = new XmlTextWriter(sw))
317 {
318 ToXml(writer);
319 }
320
321 return sw.ToString();
322 }
323 }
324
325 public void ToXml(XmlTextWriter writer)
326 {
316 writer.WriteStartElement(String.Empty, "SceneObjectGroup", String.Empty); 327 writer.WriteStartElement(String.Empty, "SceneObjectGroup", String.Empty);
317 writer.WriteStartElement(String.Empty, "RootPart", String.Empty); 328 writer.WriteStartElement(String.Empty, "RootPart", String.Empty);
318 m_rootPart.ToXml(writer); 329 m_rootPart.ToXml(writer);
@@ -329,8 +340,6 @@ namespace OpenSim.Region.Environment.Scenes
329 } 340 }
330 writer.WriteEndElement(); 341 writer.WriteEndElement();
331 writer.WriteEndElement(); 342 writer.WriteEndElement();
332 writer.Close();
333 return sw.ToString();
334 } 343 }
335 344
336 #region Copying 345 #region Copying
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 22408d3..1004e62 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -22,7 +22,8 @@ namespace OpenSim.Region.Environment.Scenes
22 private string m_inventoryFileName = ""; 22 private string m_inventoryFileName = "";
23 private LLUUID m_folderID = LLUUID.Zero; 23 private LLUUID m_folderID = LLUUID.Zero;
24 24
25 [XmlIgnore] public PhysicsActor PhysActor = null; 25 [XmlIgnore]
26 public PhysicsActor PhysActor = null;
26 27
27 protected Dictionary<LLUUID, TaskInventoryItem> TaskInventory = new Dictionary<LLUUID, TaskInventoryItem>(); 28 protected Dictionary<LLUUID, TaskInventoryItem> TaskInventory = new Dictionary<LLUUID, TaskInventoryItem>();
28 29