aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World
diff options
context:
space:
mode:
authorSignpostMarv2012-10-15 14:28:34 +0100
committerJustin Clark-Casey (justincc)2012-10-29 23:38:59 +0000
commit9df510157e26ffcaf04fd4b85512778fddc08f68 (patch)
treecdbe80ed975bd16cd59416e556fdbb2a4273d4ef /OpenSim/Region/CoreModules/World
parentremoving superfluous lines from SceneObjectPart.SendSound (diff)
downloadopensim-SC-9df510157e26ffcaf04fd4b85512778fddc08f68.zip
opensim-SC-9df510157e26ffcaf04fd4b85512778fddc08f68.tar.gz
opensim-SC-9df510157e26ffcaf04fd4b85512778fddc08f68.tar.bz2
opensim-SC-9df510157e26ffcaf04fd4b85512778fddc08f68.tar.xz
deduplicating code into a single LoopSound method
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r--OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs
index b4b8e79..6f35a23 100644
--- a/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs
+++ b/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs
@@ -248,13 +248,22 @@ namespace OpenSim.Region.CoreModules.World.Sound
248 }); 248 });
249 } 249 }
250 250
251 public virtual void LoopSoundMaster(UUID objectID, UUID soundID, 251 // Xantor 20080528 we should do this differently.
252 double volume, double radius) 252 // 1) apply the sound to the object
253 // 2) schedule full update
254 // just sending the sound out once doesn't work so well when other avatars come in view later on
255 // or when the prim gets moved, changed, sat on, whatever
256 // see large number of mantises (mantes?)
257 // 20080530 Updated to remove code duplication
258 // 20080530 Stop sound if there is one, otherwise volume only changes don't work
259 public void LoopSound(UUID objectID, UUID soundID,
260 double volume, double radius, bool isMaster)
253 { 261 {
254 SceneObjectPart m_host; 262 SceneObjectPart m_host;
255 if (!m_scene.TryGetSceneObjectPart(objectID, out m_host)) 263 if (!m_scene.TryGetSceneObjectPart(objectID, out m_host))
256 return; 264 return;
257 265
266 if (isMaster)
258 m_host.ParentGroup.LoopSoundMasterPrim = m_host; 267 m_host.ParentGroup.LoopSoundMasterPrim = m_host;
259 268
260 if (m_host.Sound != UUID.Zero) 269 if (m_host.Sound != UUID.Zero)