diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 92 |
1 files changed, 91 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 9c6706f..f0b0f4a 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -160,10 +160,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
160 | 160 | ||
161 | private IAssetService m_assetService = null; | 161 | private IAssetService m_assetService = null; |
162 | 162 | ||
163 | private UUID m_defaultUser; | ||
163 | 164 | ||
165 | <<<<<<< HEAD | ||
164 | private UUID m_defaultUser; | 166 | private UUID m_defaultUser; |
165 | 167 | ||
166 | public ArchiveReadRequest(Scene scene, string loadPath, Guid requestId, Dictionary<string,object>options) | 168 | public ArchiveReadRequest(Scene scene, string loadPath, Guid requestId, Dictionary<string,object>options) |
169 | ======= | ||
170 | public ArchiveReadRequest(Scene scene, string loadPath, Guid requestId, Dictionary<string, object> options) | ||
171 | >>>>>>> avn/ubitvar | ||
167 | { | 172 | { |
168 | m_rootScene = scene; | 173 | m_rootScene = scene; |
169 | 174 | ||
@@ -172,7 +177,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
172 | m_defaultUser = (UUID)options["default-user"]; | 177 | m_defaultUser = (UUID)options["default-user"]; |
173 | m_log.InfoFormat("Using User {0} as default user", m_defaultUser.ToString()); | 178 | m_log.InfoFormat("Using User {0} as default user", m_defaultUser.ToString()); |
174 | } | 179 | } |
180 | <<<<<<< HEAD | ||
175 | else | 181 | else |
182 | ======= | ||
183 | else | ||
184 | >>>>>>> avn/ubitvar | ||
176 | { | 185 | { |
177 | m_defaultUser = scene.RegionInfo.EstateSettings.EstateOwner; | 186 | m_defaultUser = scene.RegionInfo.EstateSettings.EstateOwner; |
178 | } | 187 | } |
@@ -189,8 +198,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
189 | + "If you've manually installed Mono, have you appropriately updated zlib1g as well?"); | 198 | + "If you've manually installed Mono, have you appropriately updated zlib1g as well?"); |
190 | m_log.Error(e); | 199 | m_log.Error(e); |
191 | } | 200 | } |
192 | 201 | ||
193 | m_errorMessage = String.Empty; | 202 | m_errorMessage = String.Empty; |
203 | <<<<<<< HEAD | ||
204 | ======= | ||
205 | |||
206 | >>>>>>> avn/ubitvar | ||
194 | m_merge = options.ContainsKey("merge"); | 207 | m_merge = options.ContainsKey("merge"); |
195 | m_forceTerrain = options.ContainsKey("force-terrain"); | 208 | m_forceTerrain = options.ContainsKey("force-terrain"); |
196 | m_forceParcels = options.ContainsKey("force-parcels"); | 209 | m_forceParcels = options.ContainsKey("force-parcels"); |
@@ -199,18 +212,34 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
199 | m_requestId = requestId; | 212 | m_requestId = requestId; |
200 | m_displacement = options.ContainsKey("displacement") ? (Vector3)options["displacement"] : Vector3.Zero; | 213 | m_displacement = options.ContainsKey("displacement") ? (Vector3)options["displacement"] : Vector3.Zero; |
201 | m_rotation = options.ContainsKey("rotation") ? (float)options["rotation"] : 0f; | 214 | m_rotation = options.ContainsKey("rotation") ? (float)options["rotation"] : 0f; |
215 | <<<<<<< HEAD | ||
202 | m_rotationCenter = options.ContainsKey("rotation-center") ? (Vector3)options["rotation-center"] | 216 | m_rotationCenter = options.ContainsKey("rotation-center") ? (Vector3)options["rotation-center"] |
203 | : new Vector3(scene.RegionInfo.RegionSizeX / 2f, scene.RegionInfo.RegionSizeY / 2f, 0f); | 217 | : new Vector3(scene.RegionInfo.RegionSizeX / 2f, scene.RegionInfo.RegionSizeY / 2f, 0f); |
204 | 218 | ||
205 | // Zero can never be a valid user or group id | 219 | // Zero can never be a valid user or group id |
206 | m_validUserUuids[UUID.Zero] = false; | 220 | m_validUserUuids[UUID.Zero] = false; |
207 | m_validGroupUuids[UUID.Zero] = false; | 221 | m_validGroupUuids[UUID.Zero] = false; |
222 | ======= | ||
223 | m_rotationCenter = options.ContainsKey("rotation-center") ? (Vector3)options["rotation-center"] | ||
224 | : new Vector3(scene.RegionInfo.RegionSizeX / 2f, scene.RegionInfo.RegionSizeY / 2f, 0f); | ||
225 | |||
226 | m_requestId = requestId; | ||
227 | |||
228 | // Zero can never be a valid user id (or group) | ||
229 | m_validUserUuids[UUID.Zero] = false; | ||
230 | m_validGroupUuids[UUID.Zero] = false; | ||
231 | |||
232 | >>>>>>> avn/ubitvar | ||
208 | 233 | ||
209 | m_groupsModule = m_rootScene.RequestModuleInterface<IGroupsModule>(); | 234 | m_groupsModule = m_rootScene.RequestModuleInterface<IGroupsModule>(); |
210 | m_assetService = m_rootScene.AssetService; | 235 | m_assetService = m_rootScene.AssetService; |
211 | } | 236 | } |
212 | 237 | ||
238 | <<<<<<< HEAD | ||
213 | public ArchiveReadRequest(Scene scene, Stream loadStream, Guid requestId, Dictionary<string, object>options) | 239 | public ArchiveReadRequest(Scene scene, Stream loadStream, Guid requestId, Dictionary<string, object>options) |
240 | ======= | ||
241 | public ArchiveReadRequest(Scene scene, Stream loadStream, Guid requestId, Dictionary<string, object> options) | ||
242 | >>>>>>> avn/ubitvar | ||
214 | { | 243 | { |
215 | m_rootScene = scene; | 244 | m_rootScene = scene; |
216 | m_loadPath = null; | 245 | m_loadPath = null; |
@@ -220,7 +249,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
220 | m_requestId = requestId; | 249 | m_requestId = requestId; |
221 | 250 | ||
222 | m_defaultUser = scene.RegionInfo.EstateSettings.EstateOwner; | 251 | m_defaultUser = scene.RegionInfo.EstateSettings.EstateOwner; |
252 | <<<<<<< HEAD | ||
223 | 253 | ||
254 | ======= | ||
255 | |||
256 | >>>>>>> avn/ubitvar | ||
224 | // Zero can never be a valid user id | 257 | // Zero can never be a valid user id |
225 | m_validUserUuids[UUID.Zero] = false; | 258 | m_validUserUuids[UUID.Zero] = false; |
226 | 259 | ||
@@ -294,15 +327,24 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
294 | if ((successfulAssetRestores + failedAssetRestores) % 250 == 0) | 327 | if ((successfulAssetRestores + failedAssetRestores) % 250 == 0) |
295 | m_log.Debug("[ARCHIVER]: Loaded " + successfulAssetRestores + " assets and failed to load " + failedAssetRestores + " assets..."); | 328 | m_log.Debug("[ARCHIVER]: Loaded " + successfulAssetRestores + " assets and failed to load " + failedAssetRestores + " assets..."); |
296 | } | 329 | } |
330 | <<<<<<< HEAD | ||
297 | else if (filePath.StartsWith(ArchiveConstants.TERRAINS_PATH) && (!m_merge || m_forceTerrain)) | 331 | else if (filePath.StartsWith(ArchiveConstants.TERRAINS_PATH) && (!m_merge || m_forceTerrain)) |
332 | ======= | ||
333 | else if ((!m_merge || m_forceTerrain) && filePath.StartsWith(ArchiveConstants.TERRAINS_PATH)) | ||
334 | >>>>>>> avn/ubitvar | ||
298 | { | 335 | { |
299 | LoadTerrain(scene, filePath, data); | 336 | LoadTerrain(scene, filePath, data); |
300 | } | 337 | } |
301 | else if (!m_merge && filePath.StartsWith(ArchiveConstants.SETTINGS_PATH)) | 338 | else if (!m_merge && filePath.StartsWith(ArchiveConstants.SETTINGS_PATH)) |
302 | { | 339 | { |
303 | LoadRegionSettings(scene, filePath, data, dearchivedScenes); | 340 | LoadRegionSettings(scene, filePath, data, dearchivedScenes); |
341 | <<<<<<< HEAD | ||
304 | } | 342 | } |
305 | else if (filePath.StartsWith(ArchiveConstants.LANDDATA_PATH) && (!m_merge || m_forceParcels)) | 343 | else if (filePath.StartsWith(ArchiveConstants.LANDDATA_PATH) && (!m_merge || m_forceParcels)) |
344 | ======= | ||
345 | } | ||
346 | else if ((!m_merge || m_forceParcels) && filePath.StartsWith(ArchiveConstants.LANDDATA_PATH)) | ||
347 | >>>>>>> avn/ubitvar | ||
306 | { | 348 | { |
307 | sceneContext.SerialisedParcels.Add(Encoding.UTF8.GetString(data)); | 349 | sceneContext.SerialisedParcels.Add(Encoding.UTF8.GetString(data)); |
308 | } | 350 | } |
@@ -523,7 +565,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
523 | } | 565 | } |
524 | } | 566 | } |
525 | 567 | ||
568 | <<<<<<< HEAD | ||
526 | 569 | ||
570 | ======= | ||
571 | >>>>>>> avn/ubitvar | ||
527 | bool isTelehub = (sceneObject.UUID == oldTelehubUUID) && (oldTelehubUUID != UUID.Zero); | 572 | bool isTelehub = (sceneObject.UUID == oldTelehubUUID) && (oldTelehubUUID != UUID.Zero); |
528 | 573 | ||
529 | // For now, give all incoming scene objects new uuids. This will allow scenes to be cloned | 574 | // For now, give all incoming scene objects new uuids. This will allow scenes to be cloned |
@@ -540,6 +585,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
540 | } | 585 | } |
541 | 586 | ||
542 | ModifySceneObject(scene, sceneObject); | 587 | ModifySceneObject(scene, sceneObject); |
588 | <<<<<<< HEAD | ||
589 | ======= | ||
590 | |||
591 | >>>>>>> avn/ubitvar | ||
543 | 592 | ||
544 | if (scene.AddRestoredSceneObject(sceneObject, true, false)) | 593 | if (scene.AddRestoredSceneObject(sceneObject, true, false)) |
545 | { | 594 | { |
@@ -600,6 +649,17 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
600 | // being no copy/no mod for everyone | 649 | // being no copy/no mod for everyone |
601 | lock (part.TaskInventory) | 650 | lock (part.TaskInventory) |
602 | { | 651 | { |
652 | <<<<<<< HEAD | ||
653 | ======= | ||
654 | // And zap any troublesome sit target information | ||
655 | part.SitTargetOrientation = new Quaternion(0, 0, 0, 1); | ||
656 | part.SitTargetPosition = new Vector3(0, 0, 0); | ||
657 | |||
658 | // Fix ownership/creator of inventory items | ||
659 | // Not doing so results in inventory items | ||
660 | // being no copy/no mod for everyone | ||
661 | part.TaskInventory.LockItemsForRead(true); | ||
662 | >>>>>>> avn/ubitvar | ||
603 | TaskInventoryDictionary inv = part.TaskInventory; | 663 | TaskInventoryDictionary inv = part.TaskInventory; |
604 | foreach (KeyValuePair<UUID, TaskInventoryItem> kvp in inv) | 664 | foreach (KeyValuePair<UUID, TaskInventoryItem> kvp in inv) |
605 | { | 665 | { |
@@ -620,11 +680,18 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
620 | if (!ResolveGroupUuid(kvp.Value.GroupID)) | 680 | if (!ResolveGroupUuid(kvp.Value.GroupID)) |
621 | kvp.Value.GroupID = UUID.Zero; | 681 | kvp.Value.GroupID = UUID.Zero; |
622 | } | 682 | } |
683 | <<<<<<< HEAD | ||
684 | ======= | ||
685 | part.TaskInventory.LockItemsForRead(false); | ||
686 | >>>>>>> avn/ubitvar | ||
623 | } | 687 | } |
624 | } | 688 | } |
625 | } | 689 | } |
626 | 690 | ||
691 | <<<<<<< HEAD | ||
627 | 692 | ||
693 | ======= | ||
694 | >>>>>>> avn/ubitvar | ||
628 | /// <summary> | 695 | /// <summary> |
629 | /// Load serialized parcels. | 696 | /// Load serialized parcels. |
630 | /// </summary> | 697 | /// </summary> |
@@ -645,7 +712,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
645 | parcel.AABBMin += parcelDisp; | 712 | parcel.AABBMin += parcelDisp; |
646 | parcel.AABBMax += parcelDisp; | 713 | parcel.AABBMax += parcelDisp; |
647 | } | 714 | } |
715 | <<<<<<< HEAD | ||
648 | 716 | ||
717 | ======= | ||
718 | |||
719 | >>>>>>> avn/ubitvar | ||
649 | // Validate User and Group UUID's | 720 | // Validate User and Group UUID's |
650 | 721 | ||
651 | if (!ResolveGroupUuid(parcel.GroupID)) | 722 | if (!ResolveGroupUuid(parcel.GroupID)) |
@@ -660,14 +731,26 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
660 | } | 731 | } |
661 | else | 732 | else |
662 | { | 733 | { |
734 | <<<<<<< HEAD | ||
663 | parcel.OwnerID = m_rootScene.RegionInfo.EstateSettings.EstateOwner; | 735 | parcel.OwnerID = m_rootScene.RegionInfo.EstateSettings.EstateOwner; |
736 | ======= | ||
737 | parcel.OwnerID = m_defaultUser; | ||
738 | parcel.GroupID = UUID.Zero; | ||
739 | >>>>>>> avn/ubitvar | ||
664 | parcel.IsGroupOwned = false; | 740 | parcel.IsGroupOwned = false; |
665 | } | 741 | } |
666 | } | 742 | } |
667 | else | 743 | else |
668 | { | 744 | { |
669 | if (!ResolveUserUuid(scene, parcel.OwnerID)) | 745 | if (!ResolveUserUuid(scene, parcel.OwnerID)) |
746 | <<<<<<< HEAD | ||
670 | parcel.OwnerID = m_rootScene.RegionInfo.EstateSettings.EstateOwner; | 747 | parcel.OwnerID = m_rootScene.RegionInfo.EstateSettings.EstateOwner; |
748 | ======= | ||
749 | parcel.OwnerID = m_defaultUser; | ||
750 | |||
751 | if (!ResolveGroupUuid(parcel.GroupID)) | ||
752 | parcel.GroupID = UUID.Zero; | ||
753 | >>>>>>> avn/ubitvar | ||
671 | } | 754 | } |
672 | 755 | ||
673 | List<LandAccessEntry> accessList = new List<LandAccessEntry>(); | 756 | List<LandAccessEntry> accessList = new List<LandAccessEntry>(); |
@@ -796,7 +879,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
796 | if (data == null) | 879 | if (data == null) |
797 | return false; | 880 | return false; |
798 | } | 881 | } |
882 | <<<<<<< HEAD | ||
799 | 883 | ||
884 | ======= | ||
885 | >>>>>>> avn/ubitvar | ||
800 | //m_log.DebugFormat("[ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType); | 886 | //m_log.DebugFormat("[ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType); |
801 | 887 | ||
802 | AssetBase asset = new AssetBase(new UUID(uuid), String.Empty, assetType, UUID.Zero.ToString()); | 888 | AssetBase asset = new AssetBase(new UUID(uuid), String.Empty, assetType, UUID.Zero.ToString()); |
@@ -918,7 +1004,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
918 | private bool LoadTerrain(Scene scene, string terrainPath, byte[] data) | 1004 | private bool LoadTerrain(Scene scene, string terrainPath, byte[] data) |
919 | { | 1005 | { |
920 | ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>(); | 1006 | ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>(); |
1007 | <<<<<<< HEAD | ||
921 | 1008 | ||
1009 | ======= | ||
1010 | |||
1011 | >>>>>>> avn/ubitvar | ||
922 | using (MemoryStream ms = new MemoryStream(data)) | 1012 | using (MemoryStream ms = new MemoryStream(data)) |
923 | { | 1013 | { |
924 | if (m_displacement != Vector3.Zero || m_rotation != 0f) | 1014 | if (m_displacement != Vector3.Zero || m_rotation != 0f) |