From cce760dbfcd375a700e38b8279b0c19c5624e720 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 7 Apr 2012 00:40:55 +0100
Subject: 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.
---
OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 2 +-
.../InventoryAccess/InventoryAccessModule.cs | 6 +++---
OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 19 +++++++++++++++----
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 2 --
4 files changed, 19 insertions(+), 10 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 619ef14..ae5cbff 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -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;
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 88c21af..8171487 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -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);
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 3586e95..17f3be7 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -586,10 +586,21 @@ namespace OpenSim.Region.Framework.Scenes
}
}
- ///
- /// The item ID that this object was rezzed from, if applicable.
- ///
- public UUID FromItemID { get; set; }
+ ///
+ /// The item ID that this object was rezzed from, if applicable.
+ ///
+ ///
+ /// If not applicable will be UUID.Zero
+ ///
+ public UUID FromItemID { get; set; }
+
+ ///
+ /// The folder ID that this object was rezzed from, if applicable.
+ ///
+ ///
+ /// If not applicable will be UUID.Zero
+ ///
+ public UUID FromFolderID { get; set; }
#endregion
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index fffaa06..046553b 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -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;
--
cgit v1.1