Don't append attachments multiple times

bullet-2.82
Oren Hurvitz 2014-07-18 17:39:20 +03:00
parent feacae173e
commit 712c50e0bf
1 changed files with 6 additions and 0 deletions

View File

@ -520,6 +520,12 @@ namespace OpenSim.Framework
if (!m_attachments.ContainsKey(attach.AttachPoint)) if (!m_attachments.ContainsKey(attach.AttachPoint))
m_attachments[attach.AttachPoint] = new List<AvatarAttachment>(); m_attachments[attach.AttachPoint] = new List<AvatarAttachment>();
foreach (AvatarAttachment prev in m_attachments[attach.AttachPoint])
{
if (prev.ItemID == attach.ItemID)
return;
}
m_attachments[attach.AttachPoint].Add(attach); m_attachments[attach.AttachPoint].Add(attach);
} }
} }