aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-12-22 19:09:09 +0000
committerJustin Clarke Casey2008-12-22 19:09:09 +0000
commiteda69e81efe262f42af0ac479c11cdbc0626464d (patch)
tree34c6991a0fbb536fa206acfc01e0a61ea55d43f1 /OpenSim/Region/Environment
parent* attempt at adding ODEPlugin testing part duex. This may cause the build t... (diff)
downloadopensim-SC_OLD-eda69e81efe262f42af0ac479c11cdbc0626464d.zip
opensim-SC_OLD-eda69e81efe262f42af0ac479c11cdbc0626464d.tar.gz
opensim-SC_OLD-eda69e81efe262f42af0ac479c11cdbc0626464d.tar.bz2
opensim-SC_OLD-eda69e81efe262f42af0ac479c11cdbc0626464d.tar.xz
* refactor: Make gestures module register its own events too
Diffstat (limited to 'OpenSim/Region/Environment')
-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)