mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Actually make EventManager.OnAttach() fire when an object is attached. Previously, only detach was firing!
This commit is contained in:
@@ -313,9 +313,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public event EmptyScriptCompileQueue OnEmptyScriptCompileQueue;
|
||||
|
||||
/// <summary>
|
||||
/// Called whenever an object is attached, or detached
|
||||
/// from an in-world presence.
|
||||
/// Called whenever an object is attached, or detached from an in-world presence.
|
||||
/// </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 event Attach OnAttach;
|
||||
|
||||
|
||||
@@ -528,6 +528,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// Fire after attach, so we don't get messy perms dialogs
|
||||
// 3 == AttachedRez
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user