diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs index b6677f0..5494549 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs | |||
@@ -84,9 +84,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
84 | int primCount = 0; | 84 | int primCount = 0; |
85 | stream.WriteLine("<scene>\n"); | 85 | stream.WriteLine("<scene>\n"); |
86 | 86 | ||
87 | List<EntityBase> EntityList = scene.GetEntities(); | 87 | EntityBase[] entityList = scene.GetEntities(); |
88 | 88 | foreach (EntityBase ent in entityList) | |
89 | foreach (EntityBase ent in EntityList) | ||
90 | { | 89 | { |
91 | if (ent is SceneObjectGroup) | 90 | if (ent is SceneObjectGroup) |
92 | { | 91 | { |
@@ -204,16 +203,14 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
204 | 203 | ||
205 | public static void SavePrimsToXml2(Scene scene, string fileName) | 204 | public static void SavePrimsToXml2(Scene scene, string fileName) |
206 | { | 205 | { |
207 | List<EntityBase> EntityList = scene.GetEntities(); | 206 | EntityBase[] entityList = scene.GetEntities(); |
208 | 207 | SavePrimListToXml2(entityList, fileName); | |
209 | SavePrimListToXml2(EntityList, fileName); | ||
210 | } | 208 | } |
211 | 209 | ||
212 | public static void SavePrimsToXml2(Scene scene, TextWriter stream, Vector3 min, Vector3 max) | 210 | public static void SavePrimsToXml2(Scene scene, TextWriter stream, Vector3 min, Vector3 max) |
213 | { | 211 | { |
214 | List<EntityBase> EntityList = scene.GetEntities(); | 212 | EntityBase[] entityList = scene.GetEntities(); |
215 | 213 | SavePrimListToXml2(entityList, stream, min, max); | |
216 | SavePrimListToXml2(EntityList, stream, min, max); | ||
217 | } | 214 | } |
218 | 215 | ||
219 | public static void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName) | 216 | public static void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName) |
@@ -222,7 +219,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
222 | "[SERIALISER]: Saving prims with name {0} in xml2 format for region {1} to {2}", | 219 | "[SERIALISER]: Saving prims with name {0} in xml2 format for region {1} to {2}", |
223 | primName, scene.RegionInfo.RegionName, fileName); | 220 | primName, scene.RegionInfo.RegionName, fileName); |
224 | 221 | ||
225 | List<EntityBase> entityList = scene.GetEntities(); | 222 | EntityBase[] entityList = scene.GetEntities(); |
226 | List<EntityBase> primList = new List<EntityBase>(); | 223 | List<EntityBase> primList = new List<EntityBase>(); |
227 | 224 | ||
228 | foreach (EntityBase ent in entityList) | 225 | foreach (EntityBase ent in entityList) |
@@ -236,10 +233,10 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
236 | } | 233 | } |
237 | } | 234 | } |
238 | 235 | ||
239 | SavePrimListToXml2(primList, fileName); | 236 | SavePrimListToXml2(primList.ToArray(), fileName); |
240 | } | 237 | } |
241 | 238 | ||
242 | public static void SavePrimListToXml2(List<EntityBase> entityList, string fileName) | 239 | public static void SavePrimListToXml2(EntityBase[] entityList, string fileName) |
243 | { | 240 | { |
244 | FileStream file = new FileStream(fileName, FileMode.Create); | 241 | FileStream file = new FileStream(fileName, FileMode.Create); |
245 | try | 242 | try |
@@ -260,7 +257,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
260 | } | 257 | } |
261 | } | 258 | } |
262 | 259 | ||
263 | public static void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, Vector3 min, Vector3 max) | 260 | public static void SavePrimListToXml2(EntityBase[] entityList, TextWriter stream, Vector3 min, Vector3 max) |
264 | { | 261 | { |
265 | int primCount = 0; | 262 | int primCount = 0; |
266 | stream.WriteLine("<scene>\n"); | 263 | stream.WriteLine("<scene>\n"); |