aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorTom Grimshaw2010-06-26 11:14:58 -0700
committerTom Grimshaw2010-06-26 11:14:58 -0700
commit70d3b9aecaf5bf2447b43a1359c631eb60ca66aa (patch)
tree5dbe66a0147ddc54e6a3ee2ca363bf5ae4bc85e1 /OpenSim/Region/Framework/Scenes/Scene.cs
parentAdd extra Gitminster config options to ini.example (diff)
downloadopensim-SC_OLD-70d3b9aecaf5bf2447b43a1359c631eb60ca66aa.zip
opensim-SC_OLD-70d3b9aecaf5bf2447b43a1359c631eb60ca66aa.tar.gz
opensim-SC_OLD-70d3b9aecaf5bf2447b43a1359c631eb60ca66aa.tar.bz2
opensim-SC_OLD-70d3b9aecaf5bf2447b43a1359c631eb60ca66aa.tar.xz
Add a DeleteAllSceneObjects(bool exceptNoCopy) method to allow NoCopy objects to be retained when the scene is cleared.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs17
1 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index dc58d84..c596baa 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2183,6 +2183,14 @@ namespace OpenSim.Region.Framework.Scenes
2183 /// </summary> 2183 /// </summary>
2184 public void DeleteAllSceneObjects() 2184 public void DeleteAllSceneObjects()
2185 { 2185 {
2186 DeleteAllSceneObjects(false);
2187 }
2188
2189 /// <summary>
2190 /// Delete every object from the scene. This does not include attachments worn by avatars.
2191 /// </summary>
2192 public void DeleteAllSceneObjects(bool exceptNoCopy)
2193 {
2186 lock (Entities) 2194 lock (Entities)
2187 { 2195 {
2188 ICollection<EntityBase> entities = new List<EntityBase>(Entities); 2196 ICollection<EntityBase> entities = new List<EntityBase>(Entities);
@@ -2192,8 +2200,13 @@ namespace OpenSim.Region.Framework.Scenes
2192 if (e is SceneObjectGroup) 2200 if (e is SceneObjectGroup)
2193 { 2201 {
2194 SceneObjectGroup sog = (SceneObjectGroup)e; 2202 SceneObjectGroup sog = (SceneObjectGroup)e;
2195 if (!sog.IsAttachment) 2203 if (sog != null && !sog.IsAttachment)
2196 DeleteSceneObject((SceneObjectGroup)e, false); 2204 {
2205 if (!exceptNoCopy || ((sog.GetEffectivePermissions() & (uint)PermissionMask.Copy) != 0))
2206 {
2207 DeleteSceneObject((SceneObjectGroup)e, false);
2208 }
2209 }
2197 } 2210 }
2198 } 2211 }
2199 } 2212 }