Rather than having a FromFolderID property on every single prim and only ever using the root prim one, store on SOG instead.

This reduces pointless memory usage.
0.7.4.1
Justin Clark-Casey (justincc) 2012-04-07 00:40:55 +01:00
parent 7d8bb33c5b
commit cce760dbfc
4 changed files with 19 additions and 10 deletions

View File

@ -4271,7 +4271,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
block.OwnerID = sop.OwnerID;
block.ItemID = sop.FromUserInventoryItemID;
block.FolderID = UUID.Zero; // sop.FromFolderID ??
block.FolderID = UUID.Zero; // sog.FromFolderID ??
block.FromTaskID = UUID.Zero; // ???
block.InventorySerial = (short)sop.InventorySerial;

View File

@ -654,9 +654,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
//
if (action == DeRezAction.Take || action == DeRezAction.TakeCopy)
{
if (so.RootPart.FromFolderID != UUID.Zero && userID == remoteClient.AgentId)
if (so.FromFolderID != UUID.Zero && userID == remoteClient.AgentId)
{
InventoryFolderBase f = new InventoryFolderBase(so.RootPart.FromFolderID, userID);
InventoryFolderBase f = new InventoryFolderBase(so.FromFolderID, userID);
folder = m_Scene.InventoryService.GetFolder(f);
}
}
@ -962,7 +962,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
rootPart.SalePrice = item.SalePrice;
}
rootPart.FromFolderID = item.Folder;
so.FromFolderID = item.Folder;
// Console.WriteLine("rootPart.OwnedID {0}, item.Owner {1}, item.CurrentPermissions {2:X}",
// rootPart.OwnerID, item.Owner, item.CurrentPermissions);

View File

@ -586,10 +586,21 @@ namespace OpenSim.Region.Framework.Scenes
}
}
/// <summary>
/// The item ID that this object was rezzed from, if applicable.
/// </summary>
public UUID FromItemID { get; set; }
/// <summary>
/// The item ID that this object was rezzed from, if applicable.
/// </summary>
/// <remarks>
/// If not applicable will be UUID.Zero
/// </remarks>
public UUID FromItemID { get; set; }
/// <summary>
/// The folder ID that this object was rezzed from, if applicable.
/// </summary>
/// <remarks>
/// If not applicable will be UUID.Zero
/// </remarks>
public UUID FromFolderID { get; set; }
#endregion

View File

@ -182,8 +182,6 @@ namespace OpenSim.Region.Framework.Scenes
public uint TimeStampTerse;
public UUID FromFolderID;
public int STATUS_ROTATE_X;
public int STATUS_ROTATE_Y;