aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-08-31 22:22:45 +0100
committerJustin Clark-Casey (justincc)2010-08-31 22:22:45 +0100
commit01276ef43304c3bd9a090e809b7d4f44ecfffcf5 (patch)
tree1e31115c5f82c68701550db2e27dc55e9507b8a9 /OpenSim
parentAdd ScenePresence.GetAttachments(uint attachmentPoint) (diff)
downloadopensim-SC_OLD-01276ef43304c3bd9a090e809b7d4f44ecfffcf5.zip
opensim-SC_OLD-01276ef43304c3bd9a090e809b7d4f44ecfffcf5.tar.gz
opensim-SC_OLD-01276ef43304c3bd9a090e809b7d4f44ecfffcf5.tar.bz2
opensim-SC_OLD-01276ef43304c3bd9a090e809b7d4f44ecfffcf5.tar.xz
refactor: change AttachmentsModule.AttachObject to use sp.GetAttachments rather than filter sp.Attachments list directly
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs14
1 files changed, 5 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index d56145a..de65460 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -173,16 +173,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
173 UUID itemID = UUID.Zero; 173 UUID itemID = UUID.Zero;
174 if (sp != null) 174 if (sp != null)
175 { 175 {
176 foreach(SceneObjectGroup grp in sp.Attachments) 176 foreach(SceneObjectGroup grp in sp.GetAttachments(AttachmentPt))
177 { 177 {
178 if (grp.GetAttachmentPoint() == (byte)AttachmentPt) 178 itemID = grp.GetFromItemID();
179 { 179 if (itemID != UUID.Zero)
180 itemID = grp.GetFromItemID(); 180 DetachSingleAttachmentToInv(itemID, remoteClient);
181 break; 181 }
182 }
183 }
184 if (itemID != UUID.Zero)
185 DetachSingleAttachmentToInv(itemID, remoteClient);
186 } 182 }
187 183
188 if (group.GetFromItemID() == UUID.Zero) 184 if (group.GetFromItemID() == UUID.Zero)