diff options
author | Alan Webb | 2009-08-03 21:43:08 -0400 |
---|---|---|
committer | dr scofield (aka dirk husemann) | 2009-08-04 11:41:06 +0200 |
commit | 9ffe4d850e9ccf2fc40901e186af3d38c31b9a6d (patch) | |
tree | 8f63928743d5383254bb934f58f3369c0492007e /OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | |
parent | starting to refactor path generation out of prim extrusion (diff) | |
download | opensim-SC_OLD-9ffe4d850e9ccf2fc40901e186af3d38c31b9a6d.zip opensim-SC_OLD-9ffe4d850e9ccf2fc40901e186af3d38c31b9a6d.tar.gz opensim-SC_OLD-9ffe4d850e9ccf2fc40901e186af3d38c31b9a6d.tar.bz2 opensim-SC_OLD-9ffe4d850e9ccf2fc40901e186af3d38c31b9a6d.tar.xz |
This change adds support for the attach event in scripts.
[1] Added a new OnAttach event to Scene/EventManager
[2] Hooked up existing attach event handler in XEngine.
[3] Modified SceneGraph and Scene.Inventory to trigger
attach events at the appropriate places. I was forced
to distribut the changes across two files because of
the way attach processing is distributed across the
two files.
[4] In the case of RezSingleAttachmentFromInventory it is
necessary to handle event scheduling in a special way.
There is no synchronous path available, so the fact
that this object is attached, and who it is attached to,
is cached when the ScriptInstance is created. When
the script is started, the attached handler is driven
after on_rez (but before changed, this should be reviewed).
Signed-off-by: dr scofield (aka dirk husemann) <drscofield@xyzzyxyzzy.net>
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs index 3b9ff2e..7142c8c 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | |||
@@ -53,6 +53,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
53 | myScriptEngine = _ScriptEngine; | 53 | myScriptEngine = _ScriptEngine; |
54 | 54 | ||
55 | m_log.Info("[XEngine] Hooking up to server events"); | 55 | m_log.Info("[XEngine] Hooking up to server events"); |
56 | myScriptEngine.World.EventManager.OnAttach += attach; | ||
56 | myScriptEngine.World.EventManager.OnObjectGrab += touch_start; | 57 | myScriptEngine.World.EventManager.OnObjectGrab += touch_start; |
57 | myScriptEngine.World.EventManager.OnObjectDeGrab += touch_end; | 58 | myScriptEngine.World.EventManager.OnObjectDeGrab += touch_end; |
58 | myScriptEngine.World.EventManager.OnScriptChangedEvent += changed; | 59 | myScriptEngine.World.EventManager.OnScriptChangedEvent += changed; |