mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
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>
This commit is contained in:
committed by
dr scofield (aka dirk husemann)
parent
21e62e87c7
commit
9ffe4d850e
@@ -53,6 +53,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||
myScriptEngine = _ScriptEngine;
|
||||
|
||||
m_log.Info("[XEngine] Hooking up to server events");
|
||||
myScriptEngine.World.EventManager.OnAttach += attach;
|
||||
myScriptEngine.World.EventManager.OnObjectGrab += touch_start;
|
||||
myScriptEngine.World.EventManager.OnObjectDeGrab += touch_end;
|
||||
myScriptEngine.World.EventManager.OnScriptChangedEvent += changed;
|
||||
|
||||
Reference in New Issue
Block a user