aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
diff options
context:
space:
mode:
authorJohn Hurliman2010-09-16 17:30:46 -0700
committerJohn Hurliman2010-09-16 17:30:46 -0700
commit860b2a502f797e5822c6705d4639f370f3ac5861 (patch)
tree5a74ddbd626142e27f6c3439ea267b8ea348ce9c /OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
parentAdd the modules include line back that i dropped by mistake (diff)
downloadopensim-SC-860b2a502f797e5822c6705d4639f370f3ac5861.zip
opensim-SC-860b2a502f797e5822c6705d4639f370f3ac5861.tar.gz
opensim-SC-860b2a502f797e5822c6705d4639f370f3ac5861.tar.bz2
opensim-SC-860b2a502f797e5822c6705d4639f370f3ac5861.tar.xz
Changed SceneObjectGroup to store parts with the fast and thread-safe MapAndArray collection
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs28
1 files changed, 12 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 5bdaa17..f5f6b90 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -158,16 +158,15 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
158 writer.WriteEndElement(); 158 writer.WriteEndElement();
159 writer.WriteStartElement(String.Empty, "OtherParts", String.Empty); 159 writer.WriteStartElement(String.Empty, "OtherParts", String.Empty);
160 160
161 lock (sceneObject.Children) 161 SceneObjectPart[] parts = sceneObject.Parts;
162 for (int i = 0; i < parts.Length; i++)
162 { 163 {
163 foreach (SceneObjectPart part in sceneObject.Children.Values) 164 SceneObjectPart part = parts[i];
165 if (part.UUID != sceneObject.RootPart.UUID)
164 { 166 {
165 if (part.UUID != sceneObject.RootPart.UUID) 167 writer.WriteStartElement(String.Empty, "Part", String.Empty);
166 { 168 ToOriginalXmlFormat(part, writer);
167 writer.WriteStartElement(String.Empty, "Part", String.Empty); 169 writer.WriteEndElement();
168 ToOriginalXmlFormat(part, writer);
169 writer.WriteEndElement();
170 }
171 } 170 }
172 } 171 }
173 172
@@ -281,15 +280,12 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
281 sceneObject.RootPart.ToXml(writer); 280 sceneObject.RootPart.ToXml(writer);
282 writer.WriteStartElement(String.Empty, "OtherParts", String.Empty); 281 writer.WriteStartElement(String.Empty, "OtherParts", String.Empty);
283 282
284 lock (sceneObject.Children) 283 SceneObjectPart[] parts = sceneObject.Parts;
284 for (int i = 0; i < parts.Length; i++)
285 { 285 {
286 foreach (SceneObjectPart part in sceneObject.Children.Values) 286 SceneObjectPart part = parts[i];
287 { 287 if (part.UUID != sceneObject.RootPart.UUID)
288 if (part.UUID != sceneObject.RootPart.UUID) 288 part.ToXml(writer);
289 {
290 part.ToXml(writer);
291 }
292 }
293 } 289 }
294 290
295 writer.WriteEndElement(); // End of OtherParts 291 writer.WriteEndElement(); // End of OtherParts