aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2010-11-08 02:35:47 +0000
committerMelanie2010-11-08 02:35:47 +0000
commit658524311307561a133451753daceff493d3cdad (patch)
tree5bff5b5e1dfdc42ffc904a305bc94a0cecdaabec
parentFix playing sound from HUDs (diff)
downloadopensim-SC-658524311307561a133451753daceff493d3cdad.zip
opensim-SC-658524311307561a133451753daceff493d3cdad.tar.gz
opensim-SC-658524311307561a133451753daceff493d3cdad.tar.bz2
opensim-SC-658524311307561a133451753daceff493d3cdad.tar.xz
Detach attachments displaced by other attachments
-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)