From ea47b0362548101d201f3bef26436d3420d791fd Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 16 May 2012 12:27:49 +0100 Subject: Added a invalidCollisionSoundUUID so that scripts can stop all collision sounds with llCollisionSound("",...). UUID.Zero means defaults should be used. In case part has several scripts with confliting llCollisionSound result depende on exec order. Specially on reset the efect of "" depends on reset order, it should override the others. This is intermediate improve(?) since collisions sounds seem to need a deaper revision. --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e18d9cf..eb68038 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -4779,7 +4779,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llCollisionSound(string impact_sound, double impact_volume) { m_host.AddScriptLPS(1); - + + if(impact_sound == "") + { + m_host.CollisionSoundVolume = (float)impact_volume; + m_host.CollisionSound = m_host.invalidCollisionSoundUUID; + return; + } // TODO: Parameter check logic required. UUID soundId = UUID.Zero; if (!UUID.TryParse(impact_sound, out soundId)) @@ -4795,8 +4801,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } m_host.TaskInventory.LockItemsForRead(false); } - m_host.CollisionSound = soundId; m_host.CollisionSoundVolume = (float)impact_volume; + m_host.CollisionSound = soundId; } public LSL_String llGetAnimation(string id) -- cgit v1.1