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 | |
parent | dr scofield's warnings safari: (diff) | |
download | opensim-SC-442a938a3f7fa09f9aa00cdebcb0f1fbe9088df3.zip opensim-SC-442a938a3f7fa09f9aa00cdebcb0f1fbe9088df3.tar.gz opensim-SC-442a938a3f7fa09f9aa00cdebcb0f1fbe9088df3.tar.bz2 opensim-SC-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 '')
3 files changed, 20 insertions, 11 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs index 3799c57..3ef8149 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs | |||
@@ -50,11 +50,11 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
51 | 51 | ||
52 | protected IRegionSerialiser m_serialiser; | 52 | protected IRegionSerialiser m_serialiser; |
53 | protected List<EntityBase> m_sceneObjects; | 53 | protected List<SceneObjectGroup> m_sceneObjects; |
54 | protected string m_savePath; | 54 | protected string m_savePath; |
55 | 55 | ||
56 | public ArchiveWriteRequestExecution( | 56 | public ArchiveWriteRequestExecution( |
57 | List<EntityBase> sceneObjects, IRegionSerialiser serialiser, string savePath) | 57 | List<SceneObjectGroup> sceneObjects, IRegionSerialiser serialiser, string savePath) |
58 | { | 58 | { |
59 | m_sceneObjects = sceneObjects; | 59 | m_sceneObjects = sceneObjects; |
60 | m_serialiser = serialiser; | 60 | m_serialiser = serialiser; |
@@ -67,10 +67,10 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
67 | 67 | ||
68 | TarArchiveWriter archive = new TarArchiveWriter(); | 68 | TarArchiveWriter archive = new TarArchiveWriter(); |
69 | 69 | ||
70 | foreach (EntityBase entity in m_sceneObjects) | 70 | foreach (SceneObjectGroup sceneObject in m_sceneObjects) |
71 | { | 71 | { |
72 | // FIXME: I'm fairly sure that all entities are in fact SceneObjectGroups... must fix this | 72 | //m_log.DebugFormat("[ARCHIVER]: Saving {0} {1}, {2}", entity.Name, entity.UUID, entity.GetType()); |
73 | SceneObjectGroup sceneObject = (SceneObjectGroup)entity; | 73 | |
74 | LLVector3 position = sceneObject.AbsolutePosition; | 74 | LLVector3 position = sceneObject.AbsolutePosition; |
75 | 75 | ||
76 | string serializedObject = m_serialiser.SaveGroupToXml2(sceneObject); | 76 | string serializedObject = m_serialiser.SaveGroupToXml2(sceneObject); |
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 | } |
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 7f3faa1..c24d030 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example | |||
@@ -319,6 +319,7 @@ mesh_physical_lod = 16 | |||
319 | ;; append to existing physics logfile, or overwrite existing logfiles? | 319 | ;; append to existing physics logfile, or overwrite existing logfiles? |
320 | ;physics_logging_append_existing_logfile = true | 320 | ;physics_logging_append_existing_logfile = true |
321 | 321 | ||
322 | |||
322 | [RemoteAdmin] | 323 | [RemoteAdmin] |
323 | enabled = false | 324 | enabled = false |
324 | access_password = unknown | 325 | access_password = unknown |
@@ -333,6 +334,7 @@ prefix = /admin | |||
333 | [RestRegionPlugin] | 334 | [RestRegionPlugin] |
334 | enabled = false | 335 | enabled = false |
335 | 336 | ||
337 | |||
336 | ; Uncomment the following for IRC bridge | 338 | ; Uncomment the following for IRC bridge |
337 | ; experimental, so if it breaks... keep both parts... yada yada | 339 | ; experimental, so if it breaks... keep both parts... yada yada |
338 | ; also, not good error detection when it fails | 340 | ; also, not good error detection when it fails |