Fixes mantis #5431 -- coalesced objects in HG-enabled regions. Needs more testing to make sure HG inventory isn't broken by this (it shouldn't).

bulletsim
Diva Canto 2011-04-15 16:42:40 -07:00
parent ed74be6599
commit cd6dce1108
2 changed files with 12 additions and 25 deletions

View File

@ -129,35 +129,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
}
///
/// DeleteToInventory
/// Used in DeleteToInventory
///
public override UUID DeleteToInventory(DeRezAction action, UUID folderID, List<SceneObjectGroup> objectGroups, IClientAPI remoteClient)
protected override void ExportAsset(UUID agentID, UUID assetID)
{
UUID ret = UUID.Zero;
// HACK: Only works for lists of length one.
// Intermediate version, just to make things compile
foreach (SceneObjectGroup g in objectGroups)
ret = DeleteToInventory(action, folderID, g, remoteClient);
return ret;
}
// DO NOT OVERRIDE THE BASE METHOD
public new virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
SceneObjectGroup objectGroup, IClientAPI remoteClient)
{
UUID assetID = base.DeleteToInventory(action, folderID, new List<SceneObjectGroup>() {objectGroup}, remoteClient);
if (!assetID.Equals(UUID.Zero))
{
if (remoteClient != null)
UploadInventoryItem(remoteClient.AgentId, assetID, "", 0);
}
UploadInventoryItem(agentID, assetID, "", 0);
else
m_log.Debug("[HGScene]: Scene.Inventory did not create asset");
return assetID;
}
///

View File

@ -330,11 +330,19 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
}
}
}
// This is a hook to do some per-asset post-processing for subclasses that need that
ExportAsset(remoteClient.AgentId, assetID);
}
return assetID;
}
protected virtual void ExportAsset(UUID agentID, UUID assetID)
{
// nothing to do here
}
/// <summary>
/// Add relevant permissions for an object to the item.
/// </summary>