diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index d249129..637c4a3 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -100,6 +100,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
100 | protected bool m_merge; | 100 | protected bool m_merge; |
101 | 101 | ||
102 | /// <value> | 102 | /// <value> |
103 | /// If true, suppresses the loading of terrain from the oar file | ||
104 | /// </value> | ||
105 | protected bool m_noTerrain; | ||
106 | |||
107 | /// <value> | ||
108 | /// If true, suppresses the loading of parcels from the oar file | ||
109 | /// </value> | ||
110 | protected bool m_noParcels; | ||
111 | |||
112 | /// <value> | ||
103 | /// Should we ignore any assets when reloading the archive? | 113 | /// Should we ignore any assets when reloading the archive? |
104 | /// </value> | 114 | /// </value> |
105 | protected bool m_skipAssets; | 115 | protected bool m_skipAssets; |
@@ -107,7 +117,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
107 | /// <value> | 117 | /// <value> |
108 | /// Displacement added to each object as it is added to the world | 118 | /// Displacement added to each object as it is added to the world |
109 | /// </value> | 119 | /// </value> |
110 | protected Vector3 m_displacement = new Vector3(0f, 0f, 0f); | 120 | protected Vector3 m_displacement = Vector3.Zero; |
111 | 121 | ||
112 | /// <summary> | 122 | /// <summary> |
113 | /// Used to cache lookups for valid uuids. | 123 | /// Used to cache lookups for valid uuids. |
@@ -137,7 +147,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
137 | private IAssetService m_assetService = null; | 147 | private IAssetService m_assetService = null; |
138 | 148 | ||
139 | 149 | ||
140 | public ArchiveReadRequest(Scene scene, string loadPath, bool merge, bool skipAssets, Vector3 displacement, Guid requestId) | 150 | public ArchiveReadRequest(Scene scene, string loadPath, Guid requestId, Dictionary<string,object>options) |
141 | { | 151 | { |
142 | m_rootScene = scene; | 152 | m_rootScene = scene; |
143 | 153 | ||
@@ -155,10 +165,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
155 | } | 165 | } |
156 | 166 | ||
157 | m_errorMessage = String.Empty; | 167 | m_errorMessage = String.Empty; |
158 | m_merge = merge; | 168 | m_merge = options.ContainsKey("merge"); |
159 | m_skipAssets = skipAssets; | 169 | m_noTerrain = options.ContainsKey("noTerrain"); |
170 | m_noParcels = options.ContainsKey("noParcels"); | ||
171 | m_skipAssets = options.ContainsKey("skipAssets"); | ||
160 | m_requestId = requestId; | 172 | m_requestId = requestId; |
161 | m_displacement = displacement; | 173 | m_displacement = options.ContainsKey("displacement") ? (Vector3)options["displacement"] : Vector3.Zero; |
162 | 174 | ||
163 | // Zero can never be a valid user id | 175 | // Zero can never be a valid user id |
164 | m_validUserUuids[UUID.Zero] = false; | 176 | m_validUserUuids[UUID.Zero] = false; |
@@ -167,13 +179,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
167 | m_assetService = m_rootScene.AssetService; | 179 | m_assetService = m_rootScene.AssetService; |
168 | } | 180 | } |
169 | 181 | ||
170 | public ArchiveReadRequest(Scene scene, Stream loadStream, bool merge, bool skipAssets, Guid requestId) | 182 | public ArchiveReadRequest(Scene scene, Stream loadStream, Guid requestId, Dictionary<string, object>options) |
171 | { | 183 | { |
172 | m_rootScene = scene; | 184 | m_rootScene = scene; |
173 | m_loadPath = null; | 185 | m_loadPath = null; |
174 | m_loadStream = loadStream; | 186 | m_loadStream = loadStream; |
175 | m_merge = merge; | 187 | m_skipAssets = options.ContainsKey("skipAssets"); |
176 | m_skipAssets = skipAssets; | 188 | m_merge = options.ContainsKey("merge"); |
177 | m_requestId = requestId; | 189 | m_requestId = requestId; |
178 | 190 | ||
179 | // Zero can never be a valid user id | 191 | // Zero can never be a valid user id |
@@ -249,7 +261,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
249 | if ((successfulAssetRestores + failedAssetRestores) % 250 == 0) | 261 | if ((successfulAssetRestores + failedAssetRestores) % 250 == 0) |
250 | m_log.Debug("[ARCHIVER]: Loaded " + successfulAssetRestores + " assets and failed to load " + failedAssetRestores + " assets..."); | 262 | m_log.Debug("[ARCHIVER]: Loaded " + successfulAssetRestores + " assets and failed to load " + failedAssetRestores + " assets..."); |
251 | } | 263 | } |
252 | else if (!m_merge && filePath.StartsWith(ArchiveConstants.TERRAINS_PATH)) | 264 | else if (!m_noTerrain && !m_merge && filePath.StartsWith(ArchiveConstants.TERRAINS_PATH)) |
253 | { | 265 | { |
254 | LoadTerrain(scene, filePath, data); | 266 | LoadTerrain(scene, filePath, data); |
255 | } | 267 | } |
@@ -257,7 +269,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
257 | { | 269 | { |
258 | LoadRegionSettings(scene, filePath, data, dearchivedScenes); | 270 | LoadRegionSettings(scene, filePath, data, dearchivedScenes); |
259 | } | 271 | } |
260 | else if (!m_merge && filePath.StartsWith(ArchiveConstants.LANDDATA_PATH)) | 272 | else if (!m_noParcels && !m_merge && filePath.StartsWith(ArchiveConstants.LANDDATA_PATH)) |
261 | { | 273 | { |
262 | sceneContext.SerialisedParcels.Add(Encoding.UTF8.GetString(data)); | 274 | sceneContext.SerialisedParcels.Add(Encoding.UTF8.GetString(data)); |
263 | } | 275 | } |