diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 28 |
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 |