aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMW2007-08-13 20:11:35 +0000
committerMW2007-08-13 20:11:35 +0000
commitb3c6920328778c162902d0278848f02e54413978 (patch)
treeea21b22e728f308914737b876c95432bfb52a75a
parentChanged ScriptLoader to use Path.combine. (diff)
downloadopensim-SC-b3c6920328778c162902d0278848f02e54413978.zip
opensim-SC-b3c6920328778c162902d0278848f02e54413978.tar.gz
opensim-SC-b3c6920328778c162902d0278848f02e54413978.tar.bz2
opensim-SC-b3c6920328778c162902d0278848f02e54413978.tar.xz
added Sample OnObjectGrab event to SceneEventManager for script engines to subscribe to.
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs5
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneEvents.cs10
3 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 4ea5f20..72dc9c0 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -740,5 +740,10 @@ namespace OpenSim.Region.Environment.Scenes
740 { 740 {
741 741
742 } 742 }
743
744 public void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
745 {
746 this.EventManager.TriggerObjectGrab(localID, offsetPos, remoteClient);
747 }
743 } 748 }
744} 749}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 08722a0..8ee5856 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -612,6 +612,8 @@ namespace OpenSim.Region.Environment.Scenes
612 //client.OnCreateNewInventoryFolder += commsManager.UserProfiles.HandleCreateInventoryFolder; 612 //client.OnCreateNewInventoryFolder += commsManager.UserProfiles.HandleCreateInventoryFolder;
613 client.OnFetchInventoryDescendents += commsManager.UserProfiles.HandleFecthInventoryDescendents; 613 client.OnFetchInventoryDescendents += commsManager.UserProfiles.HandleFecthInventoryDescendents;
614 client.OnRequestTaskInventory += RequestTaskInventory; 614 client.OnRequestTaskInventory += RequestTaskInventory;
615
616 client.OnGrabObject += ProcessObjectGrab;
615 } 617 }
616 618
617 protected ScenePresence CreateAndAddScenePresence(IClientAPI client) 619 protected ScenePresence CreateAndAddScenePresence(IClientAPI client)
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
index 1df95cf..cb5a967 100644
--- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -1,4 +1,5 @@
1using libsecondlife; 1using libsecondlife;
2using OpenSim.Framework.Interfaces;
2 3
3namespace OpenSim.Region.Environment.Scenes 4namespace OpenSim.Region.Environment.Scenes
4{ 5{
@@ -31,6 +32,9 @@ namespace OpenSim.Region.Environment.Scenes
31 public delegate void OnShutdownDelegate(); 32 public delegate void OnShutdownDelegate();
32 public event OnShutdownDelegate OnShutdown; 33 public event OnShutdownDelegate OnShutdown;
33 34
35 public delegate void ObjectGrabDelegate(uint localID, LLVector3 offsetPos, IClientAPI remoteClient);
36 public event ObjectGrabDelegate OnObjectGrab;
37
34 public void TriggerOnScriptConsole(string[] args) 38 public void TriggerOnScriptConsole(string[] args)
35 { 39 {
36 if (OnScriptConsole != null) 40 if (OnScriptConsole != null)
@@ -87,5 +91,11 @@ namespace OpenSim.Region.Environment.Scenes
87 if (OnShutdown != null) 91 if (OnShutdown != null)
88 OnShutdown(); 92 OnShutdown();
89 } 93 }
94
95 public void TriggerObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
96 {
97 if (OnObjectGrab != null)
98 OnObjectGrab(localID, offsetPos, remoteClient);
99 }
90 } 100 }
91} 101}