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.
This commit is contained in:
Melanie
2012-07-23 21:08:02 +02:00
parent b1b3057adc
commit 9e00e2ddec
5 changed files with 84 additions and 45 deletions

View File

@@ -151,6 +151,24 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
ToOriginalXmlFormat(sceneObject, writer, doScriptStates, false);
}
public static string ToOriginalXmlFormat(SceneObjectGroup sceneObject, string scriptedState)
{
using (StringWriter sw = new StringWriter())
{
using (XmlTextWriter writer = new XmlTextWriter(sw))
{
writer.WriteStartElement(String.Empty, "SceneObjectGroup", String.Empty);
ToOriginalXmlFormat(sceneObject, writer, false, true);
writer.WriteRaw(scriptedState);
writer.WriteEndElement();
}
return sw.ToString();
}
}
/// <summary>
/// Serialize a scene object to the original xml format
/// </summary>