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 :-)
0.6.0-stable
Dr Scofield 2008-10-07 11:28:45 +00:00
parent 18d4216cf4
commit 47c2bd2b95
1 changed files with 13 additions and 0 deletions

View File

@ -153,6 +153,19 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
// And zap any troublesome sit target information // And zap any troublesome sit target information
part.SitTargetOrientation = new Quaternion(0,0,0,1); part.SitTargetOrientation = new Quaternion(0,0,0,1);
part.SitTargetPosition = new Vector3(0,0,0); part.SitTargetPosition = new Vector3(0,0,0);
// Fix ownership/creator of inventory items
// Not doing so results in inventory items
// being no copy/no mod for everyone
TaskInventoryDictionary inv = part.TaskInventory;
foreach (KeyValuePair<UUID, TaskInventoryItem> kvp in inv) {
if (!resolveUserUuid(kvp.Value.OwnerID)) {
kvp.Value.OwnerID = masterAvatarId;
}
if (!resolveUserUuid(kvp.Value.CreatorID)) {
kvp.Value.CreatorID = masterAvatarId;
}
}
} }
if (m_scene.AddRestoredSceneObject(sceneObject, true, false)) if (m_scene.AddRestoredSceneObject(sceneObject, true, false))