SceneObjectPart.SendSound can exit early if a sound module was not found.

integration
SignpostMarv 2012-10-05 14:39:06 +01:00 committed by Justin Clark-Casey (justincc)
parent f4fe8763ad
commit 32db725dd7
1 changed files with 4 additions and 4 deletions

View File

@ -2684,6 +2684,10 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="flags"></param>
public void SendSound(string sound, double volume, bool triggered, byte flags, float radius, bool useMaster, bool isMaster)
{
ISoundModule soundModule = ParentGroup.Scene.RequestModuleInterface<ISoundModule>();
if(soundModule == null)
return;
volume = Util.Clip((float)volume, 0, 1);
UUID ownerID = OwnerID;
@ -2713,9 +2717,6 @@ namespace OpenSim.Region.Framework.Scenes
if (soundID == UUID.Zero)
return;
ISoundModule soundModule = ParentGroup.Scene.RequestModuleInterface<ISoundModule>();
if (soundModule != null)
{
if (useMaster)
{
if (isMaster)
@ -2761,7 +2762,6 @@ namespace OpenSim.Region.Framework.Scenes
else
soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius);
}
}
}
/// <summary>