diff options
author | Dr Scofield | 2008-10-07 11:28:45 +0000 |
---|---|---|
committer | Dr Scofield | 2008-10-07 11:28:45 +0000 |
commit | 47c2bd2b9581047292d9ff770de1c6c27d924da8 (patch) | |
tree | 138ec0e123cf8f200e62d24a9698b5c32ac77fad /OpenSim/Region/Environment | |
parent | Update svn properties, minor formatting cleanup. (diff) | |
download | opensim-SC-47c2bd2b9581047292d9ff770de1c6c27d924da8.zip opensim-SC-47c2bd2b9581047292d9ff770de1c6c27d924da8.tar.gz opensim-SC-47c2bd2b9581047292d9ff770de1c6c27d924da8.tar.bz2 opensim-SC-47c2bd2b9581047292d9ff770de1c6c27d924da8.tar.xz |
From: chris yeoh <yeohc@au1.ibm.com>
If you use load-oar to transfer region data from one sim to another
then currently inventory items can be left with unknown owner
permission which results in them being no-mod/no-copy for
everyone. The attached patch fixes things up so if the owner uuid does
not exist on the destination system then it assigns ownership (and the
creator for completeness) to the master avatar id. This will make it
much more practical to share copies of regions :-)
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs index 5e029d1..88e1d24 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -153,6 +153,19 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
153 | // And zap any troublesome sit target information | 153 | // And zap any troublesome sit target information |
154 | part.SitTargetOrientation = new Quaternion(0,0,0,1); | 154 | part.SitTargetOrientation = new Quaternion(0,0,0,1); |
155 | part.SitTargetPosition = new Vector3(0,0,0); | 155 | part.SitTargetPosition = new Vector3(0,0,0); |
156 | |||
157 | // Fix ownership/creator of inventory items | ||
158 | // Not doing so results in inventory items | ||
159 | // being no copy/no mod for everyone | ||
160 | TaskInventoryDictionary inv = part.TaskInventory; | ||
161 | foreach (KeyValuePair<UUID, TaskInventoryItem> kvp in inv) { | ||
162 | if (!resolveUserUuid(kvp.Value.OwnerID)) { | ||
163 | kvp.Value.OwnerID = masterAvatarId; | ||
164 | } | ||
165 | if (!resolveUserUuid(kvp.Value.CreatorID)) { | ||
166 | kvp.Value.CreatorID = masterAvatarId; | ||
167 | } | ||
168 | } | ||
156 | } | 169 | } |
157 | 170 | ||
158 | if (m_scene.AddRestoredSceneObject(sceneObject, true, false)) | 171 | if (m_scene.AddRestoredSceneObject(sceneObject, true, false)) |