Actually make EventManager.OnAttach() fire when an object is attached. Previously, only detach was firing!
parent
53a01dc422
commit
4c1740f7d8
|
@ -313,9 +313,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public event EmptyScriptCompileQueue OnEmptyScriptCompileQueue;
|
public event EmptyScriptCompileQueue OnEmptyScriptCompileQueue;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called whenever an object is attached, or detached
|
/// Called whenever an object is attached, or detached from an in-world presence.
|
||||||
/// from an in-world presence.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// If the object is being attached, then the avatarID will be present. If the object is being detached then
|
||||||
|
/// the avatarID is UUID.Zero (I know, this doesn't make much sense but now it's historical).
|
||||||
public delegate void Attach(uint localID, UUID itemID, UUID avatarID);
|
public delegate void Attach(uint localID, UUID itemID, UUID avatarID);
|
||||||
public event Attach OnAttach;
|
public event Attach OnAttach;
|
||||||
|
|
||||||
|
|
|
@ -528,6 +528,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// Fire after attach, so we don't get messy perms dialogs
|
// Fire after attach, so we don't get messy perms dialogs
|
||||||
// 3 == AttachedRez
|
// 3 == AttachedRez
|
||||||
objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3);
|
objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3);
|
||||||
|
|
||||||
|
// Do this last so that event listeners have access to all the effects of the attachment
|
||||||
|
m_parentScene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue