diff options
author | UbitUmarov | 2012-05-16 12:27:49 +0100 |
---|---|---|
committer | UbitUmarov | 2012-05-16 12:27:49 +0100 |
commit | ea47b0362548101d201f3bef26436d3420d791fd (patch) | |
tree | d3485e1923c9918b5e342fb93e2d0c46f5a21296 /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | use part VolumeDetectActive and not rootPart.VolumeDetectActive to be coeren... (diff) | |
download | opensim-SC-ea47b0362548101d201f3bef26436d3420d791fd.zip opensim-SC-ea47b0362548101d201f3bef26436d3420d791fd.tar.gz opensim-SC-ea47b0362548101d201f3bef26436d3420d791fd.tar.bz2 opensim-SC-ea47b0362548101d201f3bef26436d3420d791fd.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 |
1 files changed, 8 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 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 | |||
4779 | public void llCollisionSound(string impact_sound, double impact_volume) | 4779 | public void llCollisionSound(string impact_sound, double impact_volume) |
4780 | { | 4780 | { |
4781 | m_host.AddScriptLPS(1); | 4781 | m_host.AddScriptLPS(1); |
4782 | 4782 | ||
4783 | if(impact_sound == "") | ||
4784 | { | ||
4785 | m_host.CollisionSoundVolume = (float)impact_volume; | ||
4786 | m_host.CollisionSound = m_host.invalidCollisionSoundUUID; | ||
4787 | return; | ||
4788 | } | ||
4783 | // TODO: Parameter check logic required. | 4789 | // TODO: Parameter check logic required. |
4784 | UUID soundId = UUID.Zero; | 4790 | UUID soundId = UUID.Zero; |
4785 | if (!UUID.TryParse(impact_sound, out soundId)) | 4791 | if (!UUID.TryParse(impact_sound, out soundId)) |
@@ -4795,8 +4801,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4795 | } | 4801 | } |
4796 | m_host.TaskInventory.LockItemsForRead(false); | 4802 | m_host.TaskInventory.LockItemsForRead(false); |
4797 | } | 4803 | } |
4798 | m_host.CollisionSound = soundId; | ||
4799 | m_host.CollisionSoundVolume = (float)impact_volume; | 4804 | m_host.CollisionSoundVolume = (float)impact_volume; |
4805 | m_host.CollisionSound = soundId; | ||
4800 | } | 4806 | } |
4801 | 4807 | ||
4802 | public LSL_String llGetAnimation(string id) | 4808 | public LSL_String llGetAnimation(string id) |