mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
Store FromItemID for attachments once on SOG instead of on every SOP and only ever using the root part entry.
This eliminates some pointless memory use.
This commit is contained in:
@@ -2566,7 +2566,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
SceneObjectGroup grp = sceneObject;
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[ATTACHMENT]: Received attachment {0}, inworld asset id {1}", grp.GetFromItemID(), grp.UUID);
|
||||
"[ATTACHMENT]: Received attachment {0}, inworld asset id {1}", grp.FromItemID, grp.UUID);
|
||||
m_log.DebugFormat(
|
||||
"[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition);
|
||||
|
||||
|
||||
@@ -571,7 +571,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
set { m_LoopSoundSlavePrims = value; }
|
||||
}
|
||||
|
||||
// The UUID for the Region this Object is in.
|
||||
/// <summary>
|
||||
/// The UUID for the region this object is in.
|
||||
/// </summary>
|
||||
public UUID RegionUUID
|
||||
{
|
||||
get
|
||||
@@ -584,6 +586,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The item ID that this object was rezzed from, if applicable.
|
||||
/// </summary>
|
||||
public UUID FromItemID { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
// ~SceneObjectGroup()
|
||||
@@ -646,18 +653,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
public void SetFromItemID(UUID AssetId)
|
||||
{
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
parts[i].FromItemID = AssetId;
|
||||
}
|
||||
|
||||
public UUID GetFromItemID()
|
||||
{
|
||||
return m_rootPart.FromItemID;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hooks this object up to the backup event so that it is persisted to the database when the update thread executes.
|
||||
/// </summary>
|
||||
@@ -2687,6 +2682,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
m_rootPart.AttachedPos = pos;
|
||||
}
|
||||
|
||||
if (RootPart.GetStatusSandbox())
|
||||
{
|
||||
if (Util.GetDistanceTo(RootPart.StatusSandboxPos, pos) > 10)
|
||||
@@ -2697,8 +2693,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
ChatTypeEnum.DebugChannel, 0x7FFFFFFF, RootPart.AbsolutePosition, Name, UUID, false);
|
||||
}
|
||||
}
|
||||
AbsolutePosition = pos;
|
||||
|
||||
AbsolutePosition = pos;
|
||||
HasGroupChanged = true;
|
||||
}
|
||||
|
||||
@@ -3270,7 +3266,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public virtual string ExtraToXmlString()
|
||||
{
|
||||
return "<ExtraFromItemID>" + GetFromItemID().ToString() + "</ExtraFromItemID>";
|
||||
return "<ExtraFromItemID>" + FromItemID.ToString() + "</ExtraFromItemID>";
|
||||
}
|
||||
|
||||
public virtual void ExtraFromXmlString(string xmlstr)
|
||||
@@ -3282,7 +3278,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
UUID uuid = UUID.Zero;
|
||||
UUID.TryParse(id, out uuid);
|
||||
|
||||
SetFromItemID(uuid);
|
||||
FromItemID = uuid;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -181,8 +181,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public uint TimeStampLastActivity; // Will be used for AutoReturn
|
||||
|
||||
public uint TimeStampTerse;
|
||||
|
||||
public UUID FromItemID;
|
||||
|
||||
public UUID FromFolderID;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user