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

LSLKeyTest
UbitUmarov 2016-08-29 10:03:06 +01:00
parent 90d88f2df5
commit 832758df2b
1 changed files with 4 additions and 4 deletions

View File

@ -594,11 +594,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
group.ResumeScripts(); group.ResumeScripts();
} }
else
// Do this last so that event listeners have access to all the effects of the attachment // Do this last so that event listeners have access to all the effects of the attachment
// this can't be done // this can't be done when creating scripts:
// scripts do internal enqueue of attach even // scripts do internal enqueue of attach event
// and not all scripts are loaded at this point // 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; return true;
@ -1331,7 +1332,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
// Save avatar attachment information // Save avatar attachment information
m_scene.AvatarFactory.QueueAppearanceSave(sp.UUID); m_scene.AvatarFactory.QueueAppearanceSave(sp.UUID);
m_scene.EventManager.TriggerOnAttach(group.LocalId, group.FromItemID, sp.UUID);
} }
} }
catch (Exception e) catch (Exception e)