aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Serialization
diff options
context:
space:
mode:
authorMelanie2010-09-17 03:49:30 +0100
committerMelanie2010-09-17 03:49:30 +0100
commit7df438323576603344442e1350ed593e797ae3ae (patch)
tree2de03b8eaf5de93ba3305b0af8ae2616f9440d15 /OpenSim/Region/Framework/Scenes/Serialization
parentRevert "* Changed 11 calls for session info to the more optimized API method" (diff)
parentRevert "* Changed 11 calls for session info to the more optimized API method" (diff)
downloadopensim-SC-7df438323576603344442e1350ed593e797ae3ae.zip
opensim-SC-7df438323576603344442e1350ed593e797ae3ae.tar.gz
opensim-SC-7df438323576603344442e1350ed593e797ae3ae.tar.bz2
opensim-SC-7df438323576603344442e1350ed593e797ae3ae.tar.xz
Merge branch 'master' into careminster-presence-refactor
Integrate the next large patch. Don't use this version, it has a ghost avatar issue. Next push will fix it.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-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 77e477f..dc8957c 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