From 832758df2bfc161ebca97a25125a85a3a2636617 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 29 Aug 2016 10:03:06 +0100 Subject: [PATCH] mantis: 8006 restrict the suspention of Trigger OnAttach to the problematic case where scripts are created, and not always as i incorrectly did before. This is still a temporary fix, other modules will not get the notification in that case. But that needs a deeper fix possible in xengine --- .../CoreModules/Avatar/Attachments/AttachmentsModule.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index fe341c2c1d..9a6fce9285 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -594,11 +594,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments group.ResumeScripts(); } + else // Do this last so that event listeners have access to all the effects of the attachment - // this can't be done - // scripts do internal enqueue of attach even + // this can't be done when creating scripts: + // scripts do internal enqueue of attach event // and not all scripts are loaded at this point -// m_scene.EventManager.TriggerOnAttach(group.LocalId, group.FromItemID, sp.UUID); + m_scene.EventManager.TriggerOnAttach(group.LocalId, group.FromItemID, sp.UUID); } return true; @@ -1331,7 +1332,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments // Save avatar attachment information m_scene.AvatarFactory.QueueAppearanceSave(sp.UUID); - m_scene.EventManager.TriggerOnAttach(group.LocalId, group.FromItemID, sp.UUID); } } catch (Exception e)