From 9468917b5f6ba6556bd9605e88227ea79e43d94e Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Fri, 25 Apr 2008 01:00:55 +0000 Subject: * Implements llTarget, llTargetRemove, at_target(), not_at_target() --- OpenSim/Region/Environment/Scenes/SceneEvents.cs | 30 +++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment/Scenes/SceneEvents.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs index c9c0ad6..74554c3 100644 --- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs +++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs @@ -132,9 +132,17 @@ namespace OpenSim.Region.Environment.Scenes public event ClientClosed OnClientClosed; public delegate void ScriptChangedEvent(uint localID, uint change); - + public event ScriptChangedEvent OnScriptChangedEvent; + public delegate void ScriptAtTargetEvent(uint localID, uint handle, LLVector3 targetpos, LLVector3 atpos); + + public event ScriptAtTargetEvent OnScriptAtTargetEvent; + + public delegate void ScriptNotAtTargetEvent(uint localID); + + public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent; + public event OnNewPresenceDelegate OnMakeChildAgent; public delegate void NewInventoryItemUploadComplete(LLUUID avatarID, LLUUID assetID, string name, int userlevel); @@ -224,6 +232,8 @@ namespace OpenSim.Region.Environment.Scenes /* Designated Event Deletage Instances */ private ScriptChangedEvent handlerScriptChangedEvent = null; //OnScriptChangedEvent; + private ScriptAtTargetEvent handlerScriptAtTargetEvent = null; + private ScriptNotAtTargetEvent handlerScriptNotAtTargetEvent = null; private ClientMovement handlerClientMovement = null; //OnClientMovement; private OnPermissionErrorDelegate handlerPermissionError = null; //OnPermissionError; private OnPluginConsoleDelegate handlerPluginConsole = null; //OnPluginConsole; @@ -534,5 +544,23 @@ namespace OpenSim.Region.Environment.Scenes handlerValidateLandBuy(sender, e); } } + + public void TriggerAtTargetEvent(uint localID, uint handle, LLVector3 targetpos, LLVector3 currentpos) + { + handlerScriptAtTargetEvent = OnScriptAtTargetEvent; + if (handlerScriptAtTargetEvent != null) + { + handlerScriptAtTargetEvent(localID, handle, targetpos, currentpos); + } + } + + public void TriggerNotAtTargetEvent(uint localID) + { + handlerScriptNotAtTargetEvent = OnScriptNotAtTargetEvent; + if (handlerScriptNotAtTargetEvent != null) + { + handlerScriptNotAtTargetEvent(localID); + } + } } } -- cgit v1.1