From 85557fb0efb95b1c2f378ce6695a76c8ea3f4604 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 22 Dec 2008 18:47:20 +0000 Subject: * Like most other modules, make the sound module register for its event directly, rather than needing Scene to know about it --- OpenSim/Region/Environment/Modules/World/Sound/SoundModule.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Region/Environment/Modules') 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 public void Initialise(Scene scene, IConfigSource source) { m_scene = scene; + + m_scene.EventManager.OnNewClient += OnNewClient; + m_scene.RegisterModuleInterface(this); } @@ -53,6 +56,11 @@ namespace OpenSim.Region.Environment.World.Sound public string Name { get { return "Sound Module"; } } public bool IsSharedModule { get { return false; } } + private void OnNewClient(IClientAPI client) + { + client.OnSoundTrigger += TriggerSound; + } + public virtual void TriggerSound( UUID soundId, UUID ownerID, UUID objectID, UUID parentID, float gain, Vector3 position, UInt64 handle) { -- cgit v1.1