diff options
author | Melanie | 2012-07-23 21:08:02 +0200 |
---|---|---|
committer | Melanie | 2012-07-23 21:08:02 +0200 |
commit | 9e00e2ddecdafa489de0ae67b78cf6971e55fe80 (patch) | |
tree | d2a9fdc3424a7dca00a1612399b25a3db0ac76a5 /OpenSim/Region/Framework/Scenes/Serialization | |
parent | Fix double-ping on logout by not sending a stop packet to the client (diff) | |
download | opensim-SC_OLD-9e00e2ddecdafa489de0ae67b78cf6971e55fe80.zip opensim-SC_OLD-9e00e2ddecdafa489de0ae67b78cf6971e55fe80.tar.gz opensim-SC_OLD-9e00e2ddecdafa489de0ae67b78cf6971e55fe80.tar.bz2 opensim-SC_OLD-9e00e2ddecdafa489de0ae67b78cf6971e55fe80.tar.xz |
Change attachment handling to remove object from the scene first as per
justincc's original work. Sample scripts before doing so. Also refactor some
crucial common code and eliminate parameters that were only ever used with
the same constant value.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 2372d6b..0d292e7 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -151,6 +151,24 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
151 | ToOriginalXmlFormat(sceneObject, writer, doScriptStates, false); | 151 | ToOriginalXmlFormat(sceneObject, writer, doScriptStates, false); |
152 | } | 152 | } |
153 | 153 | ||
154 | public static string ToOriginalXmlFormat(SceneObjectGroup sceneObject, string scriptedState) | ||
155 | { | ||
156 | using (StringWriter sw = new StringWriter()) | ||
157 | { | ||
158 | using (XmlTextWriter writer = new XmlTextWriter(sw)) | ||
159 | { | ||
160 | writer.WriteStartElement(String.Empty, "SceneObjectGroup", String.Empty); | ||
161 | |||
162 | ToOriginalXmlFormat(sceneObject, writer, false, true); | ||
163 | |||
164 | writer.WriteRaw(scriptedState); | ||
165 | |||
166 | writer.WriteEndElement(); | ||
167 | } | ||
168 | return sw.ToString(); | ||
169 | } | ||
170 | } | ||
171 | |||
154 | /// <summary> | 172 | /// <summary> |
155 | /// Serialize a scene object to the original xml format | 173 | /// Serialize a scene object to the original xml format |
156 | /// </summary> | 174 | /// </summary> |