aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Sound/SoundModule.cs8
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs4
2 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Sound/SoundModule.cs b/OpenSim/Region/Environment/Modules/World/Sound/SoundModule.cs
index 05f2002..7c89466 100644
--- a/OpenSim/Region/Environment/Modules/World/Sound/SoundModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Sound/SoundModule.cs
@@ -45,6 +45,9 @@ namespace OpenSim.Region.Environment.World.Sound
45 public void Initialise(Scene scene, IConfigSource source) 45 public void Initialise(Scene scene, IConfigSource source)
46 { 46 {
47 m_scene = scene; 47 m_scene = scene;
48
49 m_scene.EventManager.OnNewClient += OnNewClient;
50
48 m_scene.RegisterModuleInterface<ISoundModule>(this); 51 m_scene.RegisterModuleInterface<ISoundModule>(this);
49 } 52 }
50 53
@@ -53,6 +56,11 @@ namespace OpenSim.Region.Environment.World.Sound
53 public string Name { get { return "Sound Module"; } } 56 public string Name { get { return "Sound Module"; } }
54 public bool IsSharedModule { get { return false; } } 57 public bool IsSharedModule { get { return false; } }
55 58
59 private void OnNewClient(IClientAPI client)
60 {
61 client.OnSoundTrigger += TriggerSound;
62 }
63
56 public virtual void TriggerSound( 64 public virtual void TriggerSound(
57 UUID soundId, UUID ownerID, UUID objectID, UUID parentID, float gain, Vector3 position, UInt64 handle) 65 UUID soundId, UUID ownerID, UUID objectID, UUID parentID, float gain, Vector3 position, UInt64 handle)
58 { 66 {
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index c359e4a..ee27be1 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2340,10 +2340,6 @@ namespace OpenSim.Region.Environment.Scenes
2340 client.OnActivateGesture += gesturesModule.ActivateGesture; 2340 client.OnActivateGesture += gesturesModule.ActivateGesture;
2341 client.OnDeactivateGesture += gesturesModule.DeactivateGesture; 2341 client.OnDeactivateGesture += gesturesModule.DeactivateGesture;
2342 } 2342 }
2343
2344 ISoundModule soundModule = RequestModuleInterface<ISoundModule>();
2345 if (soundModule != null)
2346 client.OnSoundTrigger += soundModule.TriggerSound;
2347 2343
2348 client.OnObjectOwner += ObjectOwner; 2344 client.OnObjectOwner += ObjectOwner;
2349 2345