mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 18:55:58 +08:00
refactoring StopSound into a private static method to skip repeating m_scene.TryGetSceneObjectPart
This commit is contained in:
committed by
Justin Clark-Casey (justincc)
parent
e5df8cafb8
commit
3d8f59aac3
@@ -185,6 +185,11 @@ namespace OpenSim.Region.CoreModules.World.Sound
|
||||
if (!m_scene.TryGetSceneObjectPart(objectID, out m_host))
|
||||
return;
|
||||
|
||||
StopSound(m_host);
|
||||
}
|
||||
|
||||
private static void StopSound(SceneObjectPart m_host)
|
||||
{
|
||||
m_host.AdjustSoundGain(0);
|
||||
// Xantor 20080528: Clear prim data of sound instead
|
||||
if (m_host.ParentGroup.LoopSoundSlavePrims.Contains(m_host))
|
||||
@@ -253,7 +258,7 @@ namespace OpenSim.Region.CoreModules.World.Sound
|
||||
m_host.ParentGroup.LoopSoundMasterPrim = m_host;
|
||||
|
||||
if (m_host.Sound != UUID.Zero)
|
||||
StopSound(objectID);
|
||||
StopSound(m_host);
|
||||
|
||||
m_host.Sound = soundID;
|
||||
m_host.SoundGain = volume;
|
||||
|
||||
Reference in New Issue
Block a user