mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
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>
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user