mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Added DynAttrs to the serialized XML format of prims. When copying prims, use deep copy for DynAttrs.
This commit is contained in:
committed by
Justin Clark-Casey (justincc)
parent
86802bcf93
commit
af6a7cf95d
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user