diff options
author | Justin Clarke Casey | 2008-06-27 18:18:44 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-06-27 18:18:44 +0000 |
commit | 442a938a3f7fa09f9aa00cdebcb0f1fbe9088df3 (patch) | |
tree | 8396b8ce154a270d886dbeb9325eb794012d20fc /OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs | |
parent | dr scofield's warnings safari: (diff) | |
download | opensim-SC_OLD-442a938a3f7fa09f9aa00cdebcb0f1fbe9088df3.zip opensim-SC_OLD-442a938a3f7fa09f9aa00cdebcb0f1fbe9088df3.tar.gz opensim-SC_OLD-442a938a3f7fa09f9aa00cdebcb0f1fbe9088df3.tar.bz2 opensim-SC_OLD-442a938a3f7fa09f9aa00cdebcb0f1fbe9088df3.tar.xz |
* fix a bug where I was assuming all entities would be SceneObjectGroups - of course, some are ScenePresences
* would be nice to have a separate list in InnerScene in the future since a lot of methods end up screen entities for SOGs
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs index 5d63ce4..bed30b0 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs | |||
@@ -163,24 +163,31 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
163 | Dictionary<LLUUID, int> assetUuids = new Dictionary<LLUUID, int>(); | 163 | Dictionary<LLUUID, int> assetUuids = new Dictionary<LLUUID, int>(); |
164 | 164 | ||
165 | List<EntityBase> entities = m_scene.GetEntities(); | 165 | List<EntityBase> entities = m_scene.GetEntities(); |
166 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); | ||
166 | 167 | ||
168 | // Filter entities so that we only have scene objects. | ||
169 | // FIXME: Would be nicer to have this as a proper list in InnerScene, since lots of methods | ||
170 | // end up having to do this | ||
167 | foreach (EntityBase entity in entities) | 171 | foreach (EntityBase entity in entities) |
168 | { | 172 | { |
169 | if (entity is SceneObjectGroup) | 173 | if (entity is SceneObjectGroup) |
170 | { | 174 | sceneObjects.Add((SceneObjectGroup)entity); |
171 | GetSceneObjectAssetUuids((SceneObjectGroup)entity, assetUuids); | 175 | } |
172 | } | 176 | |
177 | foreach (SceneObjectGroup sceneObject in sceneObjects) | ||
178 | { | ||
179 | GetSceneObjectAssetUuids(sceneObject, assetUuids); | ||
173 | } | 180 | } |
174 | 181 | ||
175 | if (entities.Count > 0) | 182 | if (sceneObjects.Count > 0) |
176 | { | 183 | { |
177 | m_log.DebugFormat("[ARCHIVER]: Successfully got serialization for {0} entities", entities.Count); | 184 | m_log.DebugFormat("[ARCHIVER]: Successfully got serialization for {0} scene objects", sceneObjects.Count); |
178 | m_log.DebugFormat("[ARCHIVER]: Requiring save of {0} assets", assetUuids.Count); | 185 | m_log.DebugFormat("[ARCHIVER]: Requiring save of {0} assets", assetUuids.Count); |
179 | 186 | ||
180 | // Asynchronously request all the assets required to perform this archive operation | 187 | // Asynchronously request all the assets required to perform this archive operation |
181 | ArchiveWriteRequestExecution awre | 188 | ArchiveWriteRequestExecution awre |
182 | = new ArchiveWriteRequestExecution( | 189 | = new ArchiveWriteRequestExecution( |
183 | entities, m_scene.RequestModuleInterface<IRegionSerialiser>(), m_savePath); | 190 | sceneObjects, m_scene.RequestModuleInterface<IRegionSerialiser>(), m_savePath); |
184 | new AssetsRequest(assetUuids.Keys, m_scene.AssetCache, awre.ReceivedAllAssets).Execute(); | 191 | new AssetsRequest(assetUuids.Keys, m_scene.AssetCache, awre.ReceivedAllAssets).Execute(); |
185 | } | 192 | } |
186 | } | 193 | } |