* Implements llTarget, llTargetRemove, at_target(), not_at_target()

This commit is contained in:
Teravus Ovares
2008-04-25 01:00:55 +00:00
parent d023c331f8
commit 9468917b5f
8 changed files with 221 additions and 19 deletions

View File

@@ -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);
}
}
}
}