aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index e89368a..9c1154b 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -178,12 +178,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
178 UUID itemID = UUID.Zero; 178 UUID itemID = UUID.Zero;
179 if (sp != null) 179 if (sp != null)
180 { 180 {
181 foreach (SceneObjectGroup grp in sp.GetAttachments(AttachmentPt)) 181 foreach(SceneObjectGroup grp in sp.Attachments)
182 { 182 {
183 itemID = grp.GetFromItemID(); 183 if (grp.GetAttachmentPoint() == (byte)AttachmentPt)
184 if (itemID != UUID.Zero) 184 {
185 DetachSingleAttachmentToInv(itemID, remoteClient); 185 itemID = grp.GetFromItemID();
186 break;
187 }
186 } 188 }
189 if (itemID != UUID.Zero)
190 DetachSingleAttachmentToInv(itemID, remoteClient);
187 } 191 }
188 192
189 if (group.GetFromItemID() == UUID.Zero) 193 if (group.GetFromItemID() == UUID.Zero)