diff options
author | lbsa71 | 2007-10-12 19:31:37 +0000 |
---|---|---|
committer | lbsa71 | 2007-10-12 19:31:37 +0000 |
commit | b77bf180799e181836e0cc87a62003c36fcbd740 (patch) | |
tree | d7d2069742cab910e3f83167087bdd4a11790555 | |
parent | I broke the build and am reverting until I can get the MainLog call proper. (diff) | |
download | opensim-SC_OLD-b77bf180799e181836e0cc87a62003c36fcbd740.zip opensim-SC_OLD-b77bf180799e181836e0cc87a62003c36fcbd740.tar.gz opensim-SC_OLD-b77bf180799e181836e0cc87a62003c36fcbd740.tar.bz2 opensim-SC_OLD-b77bf180799e181836e0cc87a62003c36fcbd740.tar.xz |
* Just extracted a standard ToXml() on SceneObjectGroup
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 17 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 3 |
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 | ||