aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorSignpostMarv2012-10-06 22:40:26 +0100
committerJustin Clark-Casey (justincc)2012-10-29 23:38:59 +0000
commit3d8f59aac38e57cf573809b0456053aa0cc8500d (patch)
tree717088ef9fe0e43ccc054ac786484161c1988e5e /OpenSim/Region/CoreModules
parentRemoving a locked iteration over SceneObjectGroup.LoopSoundSlavePrims as the ... (diff)
downloadopensim-SC_OLD-3d8f59aac38e57cf573809b0456053aa0cc8500d.zip
opensim-SC_OLD-3d8f59aac38e57cf573809b0456053aa0cc8500d.tar.gz
opensim-SC_OLD-3d8f59aac38e57cf573809b0456053aa0cc8500d.tar.bz2
opensim-SC_OLD-3d8f59aac38e57cf573809b0456053aa0cc8500d.tar.xz
refactoring StopSound into a private static method to skip repeating m_scene.TryGetSceneObjectPart
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs
index 7ce13d1..b4b8e79 100644
--- a/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs
+++ b/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs
@@ -185,6 +185,11 @@ namespace OpenSim.Region.CoreModules.World.Sound
185 if (!m_scene.TryGetSceneObjectPart(objectID, out m_host)) 185 if (!m_scene.TryGetSceneObjectPart(objectID, out m_host))
186 return; 186 return;
187 187
188 StopSound(m_host);
189 }
190
191 private static void StopSound(SceneObjectPart m_host)
192 {
188 m_host.AdjustSoundGain(0); 193 m_host.AdjustSoundGain(0);
189 // Xantor 20080528: Clear prim data of sound instead 194 // Xantor 20080528: Clear prim data of sound instead
190 if (m_host.ParentGroup.LoopSoundSlavePrims.Contains(m_host)) 195 if (m_host.ParentGroup.LoopSoundSlavePrims.Contains(m_host))
@@ -253,7 +258,7 @@ namespace OpenSim.Region.CoreModules.World.Sound
253 m_host.ParentGroup.LoopSoundMasterPrim = m_host; 258 m_host.ParentGroup.LoopSoundMasterPrim = m_host;
254 259
255 if (m_host.Sound != UUID.Zero) 260 if (m_host.Sound != UUID.Zero)
256 StopSound(objectID); 261 StopSound(m_host);
257 262
258 m_host.Sound = soundID; 263 m_host.Sound = soundID;
259 m_host.SoundGain = volume; 264 m_host.SoundGain = volume;