* Patch from XenReborn to make remove-region work properly without needing to do a change-region first. Careful though. I still suggest you do a change-region first.

* Patch from Melanie to implement touch_end.
* Thanks XenReborn!.  Thanks Melanie!
This commit is contained in:
Teravus Ovares
2008-04-27 22:15:38 +00:00
parent 911e63765c
commit 54563d8dea
8 changed files with 131 additions and 17 deletions

View File

@@ -67,6 +67,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
{
myScriptEngine.Log.Info("[" + myScriptEngine.ScriptEngineName + "]: Hooking up to server events");
myScriptEngine.World.EventManager.OnObjectGrab += touch_start;
myScriptEngine.World.EventManager.OnObjectDeGrab += touch_end;
myScriptEngine.World.EventManager.OnRezScript += OnRezScript;
myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript;
myScriptEngine.World.EventManager.OnScriptChangedEvent += changed;
@@ -117,6 +118,15 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_start", detstruct, new object[] { (int)1 });
}
public void touch_end(uint localID, IClientAPI remoteClient)
{
// Add to queue for all scripts in ObjectID object
EventQueueManager.Queue_llDetectParams_Struct detstruct = new EventQueueManager.Queue_llDetectParams_Struct();
detstruct._key = new LSL_Types.key[1];
detstruct._key[0] = new LSL_Types.key(remoteClient.AgentId.ToString());
myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_end", detstruct, new object[] { (int)1 });
}
public void OnRezScript(uint localID, LLUUID itemID, string script)
{
Console.WriteLine("OnRezScript localID: " + localID + " LLUID: " + itemID.ToString() + " Size: " +