Attachments Module. Fix detach event not being fired until the next time the object is attached.
Not an ideal fix but this allows scripts such as AOs to remove animations when detached etc. The pause added does not affect other avatars or the scene in general and only pauses the avatar performing the detach for an extra 2 milliseconds. Signed-off-by: Diva Canto <diva@metaverseink.com>fsassets
parent
22ee1c30e3
commit
5e09e52ee9
|
@ -929,8 +929,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
private string PrepareScriptInstanceForSave(SceneObjectGroup grp, bool fireDetachEvent)
|
||||
{
|
||||
if (fireDetachEvent)
|
||||
{
|
||||
m_scene.EventManager.TriggerOnAttach(grp.LocalId, grp.FromItemID, UUID.Zero);
|
||||
|
||||
// Allow detach event time to do some work before stopping the script
|
||||
Thread.Sleep(2);
|
||||
}
|
||||
|
||||
using (StringWriter sw = new StringWriter())
|
||||
{
|
||||
using (XmlTextWriter writer = new XmlTextWriter(sw))
|
||||
|
|
Loading…
Reference in New Issue