From information given my Mandarinka Tasty, add firing the detach event even for temp attachments

LSLKeyTest
Melanie Thielker 2016-04-27 00:35:30 +02:00
parent cf87898358
commit 2c75be7f6e
1 changed files with 3 additions and 0 deletions

View File

@ -779,6 +779,9 @@ 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)
{ {
// Retirn value is ignored
PrepareScriptInstanceForSave(so, true);
lock (sp.AttachmentsSyncLock) lock (sp.AttachmentsSyncLock)
{ {
bool changed = sp.Appearance.DetachAttachment(so.FromItemID); bool changed = sp.Appearance.DetachAttachment(so.FromItemID);