diff options
author | Justin Clarke Casey | 2008-12-22 18:47:20 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-12-22 18:47:20 +0000 |
commit | 85557fb0efb95b1c2f378ce6695a76c8ea3f4604 (patch) | |
tree | 67d1ce1cfded7f5bedfdeb533dce1544c658f075 /OpenSim/Region/Environment/Modules/World/Sound/SoundModule.cs | |
parent | * Refactor: Move some code into separate methods in FriendsModule (diff) | |
download | opensim-SC_OLD-85557fb0efb95b1c2f378ce6695a76c8ea3f4604.zip opensim-SC_OLD-85557fb0efb95b1c2f378ce6695a76c8ea3f4604.tar.gz opensim-SC_OLD-85557fb0efb95b1c2f378ce6695a76c8ea3f4604.tar.bz2 opensim-SC_OLD-85557fb0efb95b1c2f378ce6695a76c8ea3f4604.tar.xz |
* Like most other modules, make the sound module register for its event directly, rather than needing Scene to know about it
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Sound/SoundModule.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Sound/SoundModule.cs | 8 |
1 files changed, 8 insertions, 0 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 | { |