Fire detach events even in temp attachments. They don't really need it but keeping the tests happy

LSLKeyTest
Melanie Thielker 2016-04-25 20:27:23 +02:00
parent 8f668ec888
commit 61a7566381
1 changed files with 9 additions and 1 deletions

View File

@ -779,7 +779,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
// on detach. It's likely a temp attachment.
if (so.FromItemID != UUID.Zero)
{
sp.RemoveAttachment(so);
lock (sp.AttachmentsSyncLock)
{
bool changed = sp.Appearance.DetachAttachment(so.FromItemID);
if (changed && m_scene.AvatarFactory != null)
m_scene.AvatarFactory.QueueAppearanceSave(sp.UUID);
sp.RemoveAttachment(so);
}
m_scene.DeleteSceneObject(so, false, false);
so.RemoveScriptInstances(true);
so.Clear();