SceneObjectPart.SendSound can exit early if a sound module was not found.
parent
f4fe8763ad
commit
32db725dd7
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue