aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-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 }