From a9999a9676d46669150343e4cdbf65428326a91d Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Tue, 16 Oct 2012 13:11:17 +0100 Subject: Refactoring llTriggerSoundLimited with a new method on ISoundModule, as the LL Wiki spec for llTriggerSoundLimited states an axis-aligned bounding box, not radial constraint --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 99b6189..aeb74a5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -5876,12 +5876,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); if (m_SoundModule != null) { - double radius1 = VecDist(m_host.GetWorldPosition(), top_north_east); - double radius2 = VecDist(m_host.GetWorldPosition(), bottom_south_west); - double radius = Math.Abs(radius1 - radius2); - m_SoundModule.SendSound(m_host.UUID, - KeyOrName(sound, AssetType.Sound), volume, true, 0, - (float)radius, false, false); + m_SoundModule.TriggerSoundLimited(m_host.UUID, + KeyOrName(sound, AssetType.Sound), volume, + bottom_south_west, top_north_east); } } -- cgit v1.1