diff options
author | Tom Grimshaw | 2010-06-26 13:07:17 -0700 |
---|---|---|
committer | Tom Grimshaw | 2010-06-26 13:07:17 -0700 |
commit | d188ed8ed86661a79b68f5c43ce0a94dc51308f0 (patch) | |
tree | eab99b8ff5bf09abfaffec6ac1b3c9b89a5c34d0 | |
parent | Fix another nullref issue in DeRezSceneObject (diff) | |
download | opensim-SC_OLD-d188ed8ed86661a79b68f5c43ce0a94dc51308f0.zip opensim-SC_OLD-d188ed8ed86661a79b68f5c43ce0a94dc51308f0.tar.gz opensim-SC_OLD-d188ed8ed86661a79b68f5c43ce0a94dc51308f0.tar.bz2 opensim-SC_OLD-d188ed8ed86661a79b68f5c43ce0a94dc51308f0.tar.xz |
Return everything at once, it's more efficient that way
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index abc7377..bbac919 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2191,6 +2191,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2191 | /// </summary> | 2191 | /// </summary> |
2192 | public void DeleteAllSceneObjects(bool exceptNoCopy) | 2192 | public void DeleteAllSceneObjects(bool exceptNoCopy) |
2193 | { | 2193 | { |
2194 | List<SceneObjectGroup> toReturn = new List<SceneObjectGroup>(); | ||
2194 | lock (Entities) | 2195 | lock (Entities) |
2195 | { | 2196 | { |
2196 | ICollection<EntityBase> entities = new List<EntityBase>(Entities); | 2197 | ICollection<EntityBase> entities = new List<EntityBase>(Entities); |
@@ -2208,12 +2209,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
2208 | } | 2209 | } |
2209 | else | 2210 | else |
2210 | { | 2211 | { |
2211 | DeRezObject(null, sog.RootPart.LocalId, sog.RootPart.GroupID, DeRezAction.Return, UUID.Zero); | 2212 | toReturn.Add((SceneObjectGroup)e); |
2212 | } | 2213 | } |
2213 | } | 2214 | } |
2214 | } | 2215 | } |
2215 | } | 2216 | } |
2216 | } | 2217 | } |
2218 | if (toReturn.Count > 0) | ||
2219 | { | ||
2220 | returnObjects(toReturn.ToArray(), UUID.Zero); | ||
2221 | } | ||
2217 | } | 2222 | } |
2218 | 2223 | ||
2219 | /// <summary> | 2224 | /// <summary> |