added Sample OnObjectGrab event to SceneEventManager for script engines to subscribe to.

afrisby
MW 2007-08-13 20:11:35 +00:00
parent fc82bd8de7
commit b3c6920328
3 changed files with 17 additions and 0 deletions

View File

@ -740,5 +740,10 @@ namespace OpenSim.Region.Environment.Scenes
{ {
} }
public void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
{
this.EventManager.TriggerObjectGrab(localID, offsetPos, remoteClient);
}
} }
} }

View File

@ -612,6 +612,8 @@ namespace OpenSim.Region.Environment.Scenes
//client.OnCreateNewInventoryFolder += commsManager.UserProfiles.HandleCreateInventoryFolder; //client.OnCreateNewInventoryFolder += commsManager.UserProfiles.HandleCreateInventoryFolder;
client.OnFetchInventoryDescendents += commsManager.UserProfiles.HandleFecthInventoryDescendents; client.OnFetchInventoryDescendents += commsManager.UserProfiles.HandleFecthInventoryDescendents;
client.OnRequestTaskInventory += RequestTaskInventory; client.OnRequestTaskInventory += RequestTaskInventory;
client.OnGrabObject += ProcessObjectGrab;
} }
protected ScenePresence CreateAndAddScenePresence(IClientAPI client) protected ScenePresence CreateAndAddScenePresence(IClientAPI client)

View File

@ -1,4 +1,5 @@
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Interfaces;
namespace OpenSim.Region.Environment.Scenes namespace OpenSim.Region.Environment.Scenes
{ {
@ -31,6 +32,9 @@ namespace OpenSim.Region.Environment.Scenes
public delegate void OnShutdownDelegate(); public delegate void OnShutdownDelegate();
public event OnShutdownDelegate OnShutdown; public event OnShutdownDelegate OnShutdown;
public delegate void ObjectGrabDelegate(uint localID, LLVector3 offsetPos, IClientAPI remoteClient);
public event ObjectGrabDelegate OnObjectGrab;
public void TriggerOnScriptConsole(string[] args) public void TriggerOnScriptConsole(string[] args)
{ {
if (OnScriptConsole != null) if (OnScriptConsole != null)
@ -87,5 +91,11 @@ namespace OpenSim.Region.Environment.Scenes
if (OnShutdown != null) if (OnShutdown != null)
OnShutdown(); OnShutdown();
} }
public void TriggerObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
{
if (OnObjectGrab != null)
OnObjectGrab(localID, offsetPos, remoteClient);
}
} }
} }