aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-06-28 23:31:23 +0100
committerJustin Clark-Casey (justincc)2012-06-28 23:31:23 +0100
commitbfa6896678872a4e796ec4de22e83b6cead3ba17 (patch)
tree38c266a595d458f4783105ce8157c0dfc3c556ca /OpenSim/Region/Framework
parentRather than iterating through all SOGs in the scene looking for the one that ... (diff)
downloadopensim-SC_OLD-bfa6896678872a4e796ec4de22e83b6cead3ba17.zip
opensim-SC_OLD-bfa6896678872a4e796ec4de22e83b6cead3ba17.tar.gz
opensim-SC_OLD-bfa6896678872a4e796ec4de22e83b6cead3ba17.tar.bz2
opensim-SC_OLD-bfa6896678872a4e796ec4de22e83b6cead3ba17.tar.xz
Change AttachmentsModule.DetachSingleAttachmentToInv() to accept a SOG directly instead of an item ID to then shuffle through attachments, saving CPU busywork.
Almost all callers already had the sog to hand. Still checking that it's really an attachment, but now by inspecting SOG.AttachedAvatar
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs6
-rw-r--r--OpenSim/Region/Framework/Interfaces/IScenePresence.cs4
2 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
index 375d334..ba35a41 100644
--- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
@@ -109,11 +109,11 @@ namespace OpenSim.Region.Framework.Interfaces
109 void DetachSingleAttachmentToGround(IScenePresence sp, uint objectLocalID); 109 void DetachSingleAttachmentToGround(IScenePresence sp, uint objectLocalID);
110 110
111 /// <summary> 111 /// <summary>
112 /// Detach the given item so that it remains in the user's inventory. 112 /// Detach the given attachment so that it remains in the user's inventory.
113 /// </summary> 113 /// </summary>
114 /// <param name="sp">/param> 114 /// <param name="sp">/param>
115 /// <param name="itemID"></param> 115 /// <param name="grp">The attachment to detach.</param>
116 void DetachSingleAttachmentToInv(IScenePresence sp, UUID itemID); 116 void DetachSingleAttachmentToInv(IScenePresence sp, SceneObjectGroup grp);
117 117
118 /// <summary> 118 /// <summary>
119 /// Update the position of an attachment. 119 /// Update the position of an attachment.
diff --git a/OpenSim/Region/Framework/Interfaces/IScenePresence.cs b/OpenSim/Region/Framework/Interfaces/IScenePresence.cs
index 19a8236..e6b926c 100644
--- a/OpenSim/Region/Framework/Interfaces/IScenePresence.cs
+++ b/OpenSim/Region/Framework/Interfaces/IScenePresence.cs
@@ -72,6 +72,10 @@ namespace OpenSim.Region.Framework.Interfaces
72 /// <returns></returns> 72 /// <returns></returns>
73 List<SceneObjectGroup> GetAttachments(uint attachmentPoint); 73 List<SceneObjectGroup> GetAttachments(uint attachmentPoint);
74 74
75 /// <summary>
76 /// Does this avatar have any attachments?
77 /// </summary>
78 /// <returns></returns>
75 bool HasAttachments(); 79 bool HasAttachments();
76 80
77 // Don't use these methods directly. Instead, use the AttachmentsModule 81 // Don't use these methods directly. Instead, use the AttachmentsModule