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. // on detach. It's likely a temp attachment.
if (so.FromItemID != UUID.Zero) if (so.FromItemID != UUID.Zero)
{ {
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); sp.RemoveAttachment(so);
}
m_scene.DeleteSceneObject(so, false, false); m_scene.DeleteSceneObject(so, false, false);
so.RemoveScriptInstances(true); so.RemoveScriptInstances(true);
so.Clear(); so.Clear();