Added DynAttrs to the serialized XML format of prims. When copying prims, use deep copy for DynAttrs.

This commit is contained in:
Oren Hurvitz
2013-01-22 11:59:20 +02:00
committed by Justin Clark-Casey (justincc)
parent 86802bcf93
commit af6a7cf95d
3 changed files with 40 additions and 2 deletions

View File

@@ -67,7 +67,7 @@ namespace OpenSim.Framework
public void ReadXml(string rawXml)
{
//System.Console.WriteLine("Trying to deserialize [{0}]", rawXml);
// System.Console.WriteLine("Trying to deserialize [{0}]", rawXml);
lock (this)
m_map = (OSDMap)OSDParser.DeserializeLLSDXml(rawXml);
@@ -87,7 +87,29 @@ namespace OpenSim.Framework
public void WriteXml(XmlWriter writer)
{
writer.WriteRaw(ToXml());
}
}
public void CopyFrom(DAMap other)
{
// Deep copy
string data = null;
lock (other)
{
if (other.Count > 0)
{
data = OSDParser.SerializeLLSDXmlString(other.m_map);
}
}
lock (this)
{
if (data == null)
Clear();
else
m_map = (OSDMap)OSDParser.DeserializeLLSDXml(data);
}
}
/// <summary>
/// Returns the number of data stores.