aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Gestures/GesturesModule.cs9
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs7
2 files changed, 9 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Gestures/GesturesModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Gestures/GesturesModule.cs
index a86fceb..62b7e35 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Gestures/GesturesModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Gestures/GesturesModule.cs
@@ -46,6 +46,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Gestures
46 public void Initialise(Scene scene, IConfigSource source) 46 public void Initialise(Scene scene, IConfigSource source)
47 { 47 {
48 m_scene = scene; 48 m_scene = scene;
49
50 m_scene.EventManager.OnNewClient += OnNewClient;
51
49 m_scene.RegisterModuleInterface<IGesturesModule>(this); 52 m_scene.RegisterModuleInterface<IGesturesModule>(this);
50 } 53 }
51 54
@@ -54,6 +57,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Gestures
54 public string Name { get { return "Gestures Module"; } } 57 public string Name { get { return "Gestures Module"; } }
55 public bool IsSharedModule { get { return false; } } 58 public bool IsSharedModule { get { return false; } }
56 59
60 private void OnNewClient(IClientAPI client)
61 {
62 client.OnActivateGesture += ActivateGesture;
63 client.OnDeactivateGesture += DeactivateGesture;
64 }
65
57 public virtual void ActivateGesture(IClientAPI client, UUID assetId, UUID gestureId) 66 public virtual void ActivateGesture(IClientAPI client, UUID assetId, UUID gestureId)
58 { 67 {
59 CachedUserInfo userInfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(client.AgentId); 68 CachedUserInfo userInfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(client.AgentId);
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index ee27be1..06354cf 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2334,13 +2334,6 @@ namespace OpenSim.Region.Environment.Scenes
2334 client.OnRegionHandleRequest += RegionHandleRequest; 2334 client.OnRegionHandleRequest += RegionHandleRequest;
2335 client.OnUnackedTerrain += TerrainUnAcked; 2335 client.OnUnackedTerrain += TerrainUnAcked;
2336 2336
2337 IGesturesModule gesturesModule = RequestModuleInterface<IGesturesModule>();
2338 if (gesturesModule != null)
2339 {
2340 client.OnActivateGesture += gesturesModule.ActivateGesture;
2341 client.OnDeactivateGesture += gesturesModule.DeactivateGesture;
2342 }
2343
2344 client.OnObjectOwner += ObjectOwner; 2337 client.OnObjectOwner += ObjectOwner;
2345 2338
2346 if (m_statsReporter != null) 2339 if (m_statsReporter != null)