mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 13:55:35 +08:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user