added Sample OnObjectGrab event to SceneEventManager for script engines to subscribe to.
parent
fc82bd8de7
commit
b3c6920328
|
@ -740,5 +740,10 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
public void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
|
||||
{
|
||||
this.EventManager.TriggerObjectGrab(localID, offsetPos, remoteClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -612,6 +612,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
//client.OnCreateNewInventoryFolder += commsManager.UserProfiles.HandleCreateInventoryFolder;
|
||||
client.OnFetchInventoryDescendents += commsManager.UserProfiles.HandleFecthInventoryDescendents;
|
||||
client.OnRequestTaskInventory += RequestTaskInventory;
|
||||
|
||||
client.OnGrabObject += ProcessObjectGrab;
|
||||
}
|
||||
|
||||
protected ScenePresence CreateAndAddScenePresence(IClientAPI client)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using libsecondlife;
|
||||
using OpenSim.Framework.Interfaces;
|
||||
|
||||
namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
|
@ -31,6 +32,9 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
public delegate void OnShutdownDelegate();
|
||||
public event OnShutdownDelegate OnShutdown;
|
||||
|
||||
public delegate void ObjectGrabDelegate(uint localID, LLVector3 offsetPos, IClientAPI remoteClient);
|
||||
public event ObjectGrabDelegate OnObjectGrab;
|
||||
|
||||
public void TriggerOnScriptConsole(string[] args)
|
||||
{
|
||||
if (OnScriptConsole != null)
|
||||
|
@ -87,5 +91,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
if (OnShutdown != null)
|
||||
OnShutdown();
|
||||
}
|
||||
|
||||
public void TriggerObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
|
||||
{
|
||||
if (OnObjectGrab != null)
|
||||
OnObjectGrab(localID, offsetPos, remoteClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue