diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index dc58d84..c5fb198 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1770,6 +1770,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1770 | public void StoreWindlightProfile(RegionLightShareData wl) | 1770 | public void StoreWindlightProfile(RegionLightShareData wl) |
1771 | { | 1771 | { |
1772 | m_regInfo.WindlightSettings = wl; | 1772 | m_regInfo.WindlightSettings = wl; |
1773 | wl.Save(); | ||
1773 | m_storageManager.DataStore.StoreRegionWindlightSettings(wl); | 1774 | m_storageManager.DataStore.StoreRegionWindlightSettings(wl); |
1774 | m_eventManager.TriggerOnSaveNewWindlightProfile(); | 1775 | m_eventManager.TriggerOnSaveNewWindlightProfile(); |
1775 | } | 1776 | } |
@@ -2183,6 +2184,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
2183 | /// </summary> | 2184 | /// </summary> |
2184 | public void DeleteAllSceneObjects() | 2185 | public void DeleteAllSceneObjects() |
2185 | { | 2186 | { |
2187 | DeleteAllSceneObjects(false); | ||
2188 | } | ||
2189 | |||
2190 | /// <summary> | ||
2191 | /// Delete every object from the scene. This does not include attachments worn by avatars. | ||
2192 | /// </summary> | ||
2193 | public void DeleteAllSceneObjects(bool exceptNoCopy) | ||
2194 | { | ||
2195 | List<SceneObjectGroup> toReturn = new List<SceneObjectGroup>(); | ||
2186 | lock (Entities) | 2196 | lock (Entities) |
2187 | { | 2197 | { |
2188 | ICollection<EntityBase> entities = new List<EntityBase>(Entities); | 2198 | ICollection<EntityBase> entities = new List<EntityBase>(Entities); |
@@ -2192,11 +2202,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
2192 | if (e is SceneObjectGroup) | 2202 | if (e is SceneObjectGroup) |
2193 | { | 2203 | { |
2194 | SceneObjectGroup sog = (SceneObjectGroup)e; | 2204 | SceneObjectGroup sog = (SceneObjectGroup)e; |
2195 | if (!sog.IsAttachment) | 2205 | if (sog != null && !sog.IsAttachment) |
2196 | DeleteSceneObject((SceneObjectGroup)e, false); | 2206 | { |
2207 | if (!exceptNoCopy || ((sog.GetEffectivePermissions() & (uint)PermissionMask.Copy) != 0)) | ||
2208 | { | ||
2209 | DeleteSceneObject((SceneObjectGroup)e, false); | ||
2210 | } | ||
2211 | else | ||
2212 | { | ||
2213 | toReturn.Add((SceneObjectGroup)e); | ||
2214 | } | ||
2215 | } | ||
2197 | } | 2216 | } |
2198 | } | 2217 | } |
2199 | } | 2218 | } |
2219 | if (toReturn.Count > 0) | ||
2220 | { | ||
2221 | returnObjects(toReturn.ToArray(), UUID.Zero); | ||
2222 | } | ||
2200 | } | 2223 | } |
2201 | 2224 | ||
2202 | /// <summary> | 2225 | /// <summary> |