aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/DAMap.cs26
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs14
3 files changed, 40 insertions, 2 deletions
diff --git a/OpenSim/Framework/DAMap.cs b/OpenSim/Framework/DAMap.cs
index c256230..291c8b8 100644
--- a/OpenSim/Framework/DAMap.cs
+++ b/OpenSim/Framework/DAMap.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Framework
67 67
68 public void ReadXml(string rawXml) 68 public void ReadXml(string rawXml)
69 { 69 {
70 //System.Console.WriteLine("Trying to deserialize [{0}]", rawXml); 70 // System.Console.WriteLine("Trying to deserialize [{0}]", rawXml);
71 71
72 lock (this) 72 lock (this)
73 m_map = (OSDMap)OSDParser.DeserializeLLSDXml(rawXml); 73 m_map = (OSDMap)OSDParser.DeserializeLLSDXml(rawXml);
@@ -87,7 +87,29 @@ namespace OpenSim.Framework
87 public void WriteXml(XmlWriter writer) 87 public void WriteXml(XmlWriter writer)
88 { 88 {
89 writer.WriteRaw(ToXml()); 89 writer.WriteRaw(ToXml());
90 } 90 }
91
92 public void CopyFrom(DAMap other)
93 {
94 // Deep copy
95
96 string data = null;
97 lock (other)
98 {
99 if (other.Count > 0)
100 {
101 data = OSDParser.SerializeLLSDXmlString(other.m_map);
102 }
103 }
104
105 lock (this)
106 {
107 if (data == null)
108 Clear();
109 else
110 m_map = (OSDMap)OSDParser.DeserializeLLSDXml(data);
111 }
112 }
91 113
92 /// <summary> 114 /// <summary>
93 /// Returns the number of data stores. 115 /// Returns the number of data stores.
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 27f3a4d..189d298 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1625,6 +1625,8 @@ namespace OpenSim.Region.Framework.Scenes
1625 Array.Copy(Shape.ExtraParams, extraP, extraP.Length); 1625 Array.Copy(Shape.ExtraParams, extraP, extraP.Length);
1626 dupe.Shape.ExtraParams = extraP; 1626 dupe.Shape.ExtraParams = extraP;
1627 1627
1628 dupe.DynAttrs.CopyFrom(DynAttrs);
1629
1628 if (userExposed) 1630 if (userExposed)
1629 { 1631 {
1630/* 1632/*
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 2d4c60a..4a2a47e 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -359,6 +359,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
359 m_SOPXmlProcessors.Add("CollisionSound", ProcessCollisionSound); 359 m_SOPXmlProcessors.Add("CollisionSound", ProcessCollisionSound);
360 m_SOPXmlProcessors.Add("CollisionSoundVolume", ProcessCollisionSoundVolume); 360 m_SOPXmlProcessors.Add("CollisionSoundVolume", ProcessCollisionSoundVolume);
361 m_SOPXmlProcessors.Add("MediaUrl", ProcessMediaUrl); 361 m_SOPXmlProcessors.Add("MediaUrl", ProcessMediaUrl);
362 m_SOPXmlProcessors.Add("DynAttrs", ProcessDynAttrs);
362 m_SOPXmlProcessors.Add("TextureAnimation", ProcessTextureAnimation); 363 m_SOPXmlProcessors.Add("TextureAnimation", ProcessTextureAnimation);
363 m_SOPXmlProcessors.Add("ParticleSystem", ProcessParticleSystem); 364 m_SOPXmlProcessors.Add("ParticleSystem", ProcessParticleSystem);
364 m_SOPXmlProcessors.Add("PayPrice0", ProcessPayPrice0); 365 m_SOPXmlProcessors.Add("PayPrice0", ProcessPayPrice0);
@@ -722,6 +723,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
722 obj.MediaUrl = reader.ReadElementContentAsString("MediaUrl", String.Empty); 723 obj.MediaUrl = reader.ReadElementContentAsString("MediaUrl", String.Empty);
723 } 724 }
724 725
726 private static void ProcessDynAttrs(SceneObjectPart obj, XmlTextReader reader)
727 {
728 obj.DynAttrs.ReadXml(reader);
729 }
730
725 private static void ProcessTextureAnimation(SceneObjectPart obj, XmlTextReader reader) 731 private static void ProcessTextureAnimation(SceneObjectPart obj, XmlTextReader reader)
726 { 732 {
727 obj.TextureAnimation = Convert.FromBase64String(reader.ReadElementContentAsString("TextureAnimation", String.Empty)); 733 obj.TextureAnimation = Convert.FromBase64String(reader.ReadElementContentAsString("TextureAnimation", String.Empty));
@@ -1235,6 +1241,14 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1235 writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString()); 1241 writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString());
1236 if (sop.MediaUrl != null) 1242 if (sop.MediaUrl != null)
1237 writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString()); 1243 writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString());
1244
1245 if (sop.DynAttrs.Count > 0)
1246 {
1247 writer.WriteStartElement("DynAttrs");
1248 sop.DynAttrs.WriteXml(writer);
1249 writer.WriteEndElement();
1250 }
1251
1238 WriteBytes(writer, "TextureAnimation", sop.TextureAnimation); 1252 WriteBytes(writer, "TextureAnimation", sop.TextureAnimation);
1239 WriteBytes(writer, "ParticleSystem", sop.ParticleSystem); 1253 WriteBytes(writer, "ParticleSystem", sop.ParticleSystem);
1240 writer.WriteElementString("PayPrice0", sop.PayPrice[0].ToString()); 1254 writer.WriteElementString("PayPrice0", sop.PayPrice[0].ToString());