diff options
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs index 40c7a69..fbda830 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -112,6 +112,9 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
112 | if (failedAssetRestores > 0) | 112 | if (failedAssetRestores > 0) |
113 | m_log.ErrorFormat("[ARCHIVER]: Failed to load {0} assets", failedAssetRestores); | 113 | m_log.ErrorFormat("[ARCHIVER]: Failed to load {0} assets", failedAssetRestores); |
114 | 114 | ||
115 | m_log.Info("[ARCHIVER]: Clearing all existing scene objects"); | ||
116 | m_scene.DeleteAllSceneObjects(); | ||
117 | |||
115 | // Reload serialized prims | 118 | // Reload serialized prims |
116 | m_log.InfoFormat("[ARCHIVER]: Loading {0} scene objects. Please wait.", serialisedSceneObjects.Count); | 119 | m_log.InfoFormat("[ARCHIVER]: Loading {0} scene objects. Please wait.", serialisedSceneObjects.Count); |
117 | 120 | ||
@@ -122,6 +125,8 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
122 | { | 125 | { |
123 | SceneObjectGroup sceneObject = serialiser.LoadGroupFromXml2(m_scene, serialisedSceneObject); | 126 | SceneObjectGroup sceneObject = serialiser.LoadGroupFromXml2(m_scene, serialisedSceneObject); |
124 | 127 | ||
128 | // TODO: Change object creator/owner here | ||
129 | |||
125 | if (null != sceneObject) | 130 | if (null != sceneObject) |
126 | sceneObjects.Add(sceneObject); | 131 | sceneObjects.Add(sceneObject); |
127 | } | 132 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index a6a5264..ad9646f 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -1684,6 +1684,23 @@ namespace OpenSim.Region.Environment.Scenes | |||
1684 | } | 1684 | } |
1685 | 1685 | ||
1686 | /// <summary> | 1686 | /// <summary> |
1687 | /// Delete every object from the scene | ||
1688 | /// </summary> | ||
1689 | public void DeleteAllSceneObjects() | ||
1690 | { | ||
1691 | lock (Entities) | ||
1692 | { | ||
1693 | ICollection<EntityBase> entities = new List<EntityBase>(Entities.Values); | ||
1694 | |||
1695 | foreach (EntityBase e in entities) | ||
1696 | { | ||
1697 | if (e is SceneObjectGroup) | ||
1698 | DeleteSceneObject((SceneObjectGroup)e); | ||
1699 | } | ||
1700 | } | ||
1701 | } | ||
1702 | |||
1703 | /// <summary> | ||
1687 | /// Delete the given object from the scene. | 1704 | /// Delete the given object from the scene. |
1688 | /// </summary> | 1705 | /// </summary> |
1689 | /// <param name="group"></param> | 1706 | /// <param name="group"></param> |