From bfa6896678872a4e796ec4de22e83b6cead3ba17 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 28 Jun 2012 23:31:23 +0100 Subject: 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 --- OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs | 6 +++--- OpenSim/Region/Framework/Interfaces/IScenePresence.cs | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework') 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 void DetachSingleAttachmentToGround(IScenePresence sp, uint objectLocalID); /// - /// Detach the given item so that it remains in the user's inventory. + /// Detach the given attachment so that it remains in the user's inventory. /// /// /param> - /// - void DetachSingleAttachmentToInv(IScenePresence sp, UUID itemID); + /// The attachment to detach. + void DetachSingleAttachmentToInv(IScenePresence sp, SceneObjectGroup grp); /// /// 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 /// List GetAttachments(uint attachmentPoint); + /// + /// Does this avatar have any attachments? + /// + /// bool HasAttachments(); // Don't use these methods directly. Instead, use the AttachmentsModule -- cgit v1.1