aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs15
1 files changed, 6 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 39b109b..bf4c55c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -39,6 +39,7 @@ using OpenMetaverse.Packets;
39using OpenSim.Framework; 39using OpenSim.Framework;
40using OpenSim.Region.Framework.Interfaces; 40using OpenSim.Region.Framework.Interfaces;
41using OpenSim.Region.Framework.Scenes.Scripting; 41using OpenSim.Region.Framework.Scenes.Scripting;
42using OpenSim.Region.Framework.Scenes.Serialization;
42using OpenSim.Region.Physics.Manager; 43using OpenSim.Region.Physics.Manager;
43 44
44namespace OpenSim.Region.Framework.Scenes 45namespace OpenSim.Region.Framework.Scenes
@@ -124,10 +125,6 @@ namespace OpenSim.Region.Framework.Scenes
124 get { return ParentGroup.RootPart == this; } 125 get { return ParentGroup.RootPart == this; }
125 } 126 }
126 127
127 // use only one serializer to give the runtime a chance to optimize it (it won't do that if you
128 // use a new instance every time)
129 private static XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart));
130
131 #region Fields 128 #region Fields
132 129
133 public bool AllowedDrop; 130 public bool AllowedDrop;
@@ -1850,7 +1847,7 @@ namespace OpenSim.Region.Framework.Scenes
1850 /// </summary> 1847 /// </summary>
1851 /// <param name="xmlReader"></param> 1848 /// <param name="xmlReader"></param>
1852 /// <returns></returns> 1849 /// <returns></returns>
1853 public static SceneObjectPart FromXml(XmlReader xmlReader) 1850 public static SceneObjectPart FromXml(XmlTextReader xmlReader)
1854 { 1851 {
1855 return FromXml(UUID.Zero, xmlReader); 1852 return FromXml(UUID.Zero, xmlReader);
1856 } 1853 }
@@ -1861,9 +1858,9 @@ namespace OpenSim.Region.Framework.Scenes
1861 /// <param name="fromUserInventoryItemId">The inventory id from which this part came, if applicable</param> 1858 /// <param name="fromUserInventoryItemId">The inventory id from which this part came, if applicable</param>
1862 /// <param name="xmlReader"></param> 1859 /// <param name="xmlReader"></param>
1863 /// <returns></returns> 1860 /// <returns></returns>
1864 public static SceneObjectPart FromXml(UUID fromUserInventoryItemId, XmlReader xmlReader) 1861 public static SceneObjectPart FromXml(UUID fromUserInventoryItemId, XmlTextReader xmlReader)
1865 { 1862 {
1866 SceneObjectPart part = (SceneObjectPart)serializer.Deserialize(xmlReader); 1863 SceneObjectPart part = SceneObjectSerializer.Xml2ToSOP(xmlReader);
1867 part.m_fromUserInventoryItemID = fromUserInventoryItemId; 1864 part.m_fromUserInventoryItemID = fromUserInventoryItemId;
1868 1865
1869 // for tempOnRez objects, we have to fix the Expire date. 1866 // for tempOnRez objects, we have to fix the Expire date.
@@ -4058,9 +4055,9 @@ namespace OpenSim.Region.Framework.Scenes
4058 /// Serialize this part to xml. 4055 /// Serialize this part to xml.
4059 /// </summary> 4056 /// </summary>
4060 /// <param name="xmlWriter"></param> 4057 /// <param name="xmlWriter"></param>
4061 public void ToXml(XmlWriter xmlWriter) 4058 public void ToXml(XmlTextWriter xmlWriter)
4062 { 4059 {
4063 serializer.Serialize(xmlWriter, this); 4060 SceneObjectSerializer.SOPToXml2(xmlWriter, this, new Dictionary<string, object>());
4064 } 4061 }
4065 4062
4066 public void TriggerScriptChangedEvent(Changed val) 4063 public void TriggerScriptChangedEvent(Changed val)