From ef157110897ef162c7f076d6d5f423b8cd9a8f47 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Tue, 16 Oct 2012 12:49:25 +0100 Subject: [PATCH] refactoring llTriggerSoundLimited to not use the LSL methods, since that will cause unnecessary calls to m_host.AddScriptLPS(1) --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 2654b5a83a..99b61890e5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -5876,8 +5876,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); if (m_SoundModule != null) { - double radius1 = llVecDist(llGetPos(), top_north_east); - double radius2 = llVecDist(llGetPos(), bottom_south_west); + 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,