aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-04-07 00:33:02 +0100
committerJustin Clark-Casey (justincc)2012-04-07 00:33:02 +0100
commit7d8bb33c5b2420d4e744269f67a25dd2b9746a35 (patch)
tree53e2c0d0258e81c4e87ae78521e85d98d115becc /OpenSim/Region/Framework/Scenes
parentrefactor: Eliminate unnecessary SOP.m_physActor (diff)
downloadopensim-SC_OLD-7d8bb33c5b2420d4e744269f67a25dd2b9746a35.zip
opensim-SC_OLD-7d8bb33c5b2420d4e744269f67a25dd2b9746a35.tar.gz
opensim-SC_OLD-7d8bb33c5b2420d4e744269f67a25dd2b9746a35.tar.bz2
opensim-SC_OLD-7d8bb33c5b2420d4e744269f67a25dd2b9746a35.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs28
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs2
3 files changed, 13 insertions, 19 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index d8cac66..e488fe1 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2566,7 +2566,7 @@ namespace OpenSim.Region.Framework.Scenes
2566 SceneObjectGroup grp = sceneObject; 2566 SceneObjectGroup grp = sceneObject;
2567 2567
2568 m_log.DebugFormat( 2568 m_log.DebugFormat(
2569 "[ATTACHMENT]: Received attachment {0}, inworld asset id {1}", grp.GetFromItemID(), grp.UUID); 2569 "[ATTACHMENT]: Received attachment {0}, inworld asset id {1}", grp.FromItemID, grp.UUID);
2570 m_log.DebugFormat( 2570 m_log.DebugFormat(
2571 "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); 2571 "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition);
2572 2572
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 87fdc41..3586e95 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -571,7 +571,9 @@ namespace OpenSim.Region.Framework.Scenes
571 set { m_LoopSoundSlavePrims = value; } 571 set { m_LoopSoundSlavePrims = value; }
572 } 572 }
573 573
574 // The UUID for the Region this Object is in. 574 /// <summary>
575 /// The UUID for the region this object is in.
576 /// </summary>
575 public UUID RegionUUID 577 public UUID RegionUUID
576 { 578 {
577 get 579 get
@@ -584,6 +586,11 @@ namespace OpenSim.Region.Framework.Scenes
584 } 586 }
585 } 587 }
586 588
589 /// <summary>
590 /// The item ID that this object was rezzed from, if applicable.
591 /// </summary>
592 public UUID FromItemID { get; set; }
593
587 #endregion 594 #endregion
588 595
589// ~SceneObjectGroup() 596// ~SceneObjectGroup()
@@ -646,18 +653,6 @@ namespace OpenSim.Region.Framework.Scenes
646 } 653 }
647 } 654 }
648 655
649 public void SetFromItemID(UUID AssetId)
650 {
651 SceneObjectPart[] parts = m_parts.GetArray();
652 for (int i = 0; i < parts.Length; i++)
653 parts[i].FromItemID = AssetId;
654 }
655
656 public UUID GetFromItemID()
657 {
658 return m_rootPart.FromItemID;
659 }
660
661 /// <summary> 656 /// <summary>
662 /// Hooks this object up to the backup event so that it is persisted to the database when the update thread executes. 657 /// Hooks this object up to the backup event so that it is persisted to the database when the update thread executes.
663 /// </summary> 658 /// </summary>
@@ -2687,6 +2682,7 @@ namespace OpenSim.Region.Framework.Scenes
2687 { 2682 {
2688 m_rootPart.AttachedPos = pos; 2683 m_rootPart.AttachedPos = pos;
2689 } 2684 }
2685
2690 if (RootPart.GetStatusSandbox()) 2686 if (RootPart.GetStatusSandbox())
2691 { 2687 {
2692 if (Util.GetDistanceTo(RootPart.StatusSandboxPos, pos) > 10) 2688 if (Util.GetDistanceTo(RootPart.StatusSandboxPos, pos) > 10)
@@ -2697,8 +2693,8 @@ namespace OpenSim.Region.Framework.Scenes
2697 ChatTypeEnum.DebugChannel, 0x7FFFFFFF, RootPart.AbsolutePosition, Name, UUID, false); 2693 ChatTypeEnum.DebugChannel, 0x7FFFFFFF, RootPart.AbsolutePosition, Name, UUID, false);
2698 } 2694 }
2699 } 2695 }
2700 AbsolutePosition = pos;
2701 2696
2697 AbsolutePosition = pos;
2702 HasGroupChanged = true; 2698 HasGroupChanged = true;
2703 } 2699 }
2704 2700
@@ -3270,7 +3266,7 @@ namespace OpenSim.Region.Framework.Scenes
3270 3266
3271 public virtual string ExtraToXmlString() 3267 public virtual string ExtraToXmlString()
3272 { 3268 {
3273 return "<ExtraFromItemID>" + GetFromItemID().ToString() + "</ExtraFromItemID>"; 3269 return "<ExtraFromItemID>" + FromItemID.ToString() + "</ExtraFromItemID>";
3274 } 3270 }
3275 3271
3276 public virtual void ExtraFromXmlString(string xmlstr) 3272 public virtual void ExtraFromXmlString(string xmlstr)
@@ -3282,7 +3278,7 @@ namespace OpenSim.Region.Framework.Scenes
3282 UUID uuid = UUID.Zero; 3278 UUID uuid = UUID.Zero;
3283 UUID.TryParse(id, out uuid); 3279 UUID.TryParse(id, out uuid);
3284 3280
3285 SetFromItemID(uuid); 3281 FromItemID = uuid;
3286 } 3282 }
3287 3283
3288 #endregion 3284 #endregion
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 2fcce1c..fffaa06 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -181,8 +181,6 @@ namespace OpenSim.Region.Framework.Scenes
181 public uint TimeStampLastActivity; // Will be used for AutoReturn 181 public uint TimeStampLastActivity; // Will be used for AutoReturn
182 182
183 public uint TimeStampTerse; 183 public uint TimeStampTerse;
184
185 public UUID FromItemID;
186 184
187 public UUID FromFolderID; 185 public UUID FromFolderID;
188 186