diff options
author | UbitUmarov | 2016-08-27 16:38:29 +0100 |
---|---|---|
committer | UbitUmarov | 2016-08-27 16:38:29 +0100 |
commit | b2386b8d0dd2c8579b59476abcf120efd68ac6ce (patch) | |
tree | 3d6e83eff966cbc1ac764c85278de4094095d8ba /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |
parent | watchdog timeouts: replace a silly List copy i added doing it a better way (diff) | |
download | opensim-SC_OLD-b2386b8d0dd2c8579b59476abcf120efd68ac6ce.zip opensim-SC_OLD-b2386b8d0dd2c8579b59476abcf120efd68ac6ce.tar.gz opensim-SC_OLD-b2386b8d0dd2c8579b59476abcf120efd68ac6ce.tar.bz2 opensim-SC_OLD-b2386b8d0dd2c8579b59476abcf120efd68ac6ce.tar.xz |
llCollisionSound(,value) back to disable all sounds. new osCollisionSound(..). allows defualt sounds with volume
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index f45676e..c046a0c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -5108,18 +5108,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5108 | { | 5108 | { |
5109 | m_host.CollisionSoundVolume = (float)impact_volume; | 5109 | m_host.CollisionSoundVolume = (float)impact_volume; |
5110 | m_host.CollisionSound = m_host.invalidCollisionSoundUUID; | 5110 | m_host.CollisionSound = m_host.invalidCollisionSoundUUID; |
5111 | if(impact_volume == 0.0) | 5111 | m_host.CollisionSoundType = -1; // disable all sounds |
5112 | m_host.CollisionSoundType = -1; // disable all sounds | ||
5113 | else if(impact_volume == 1.0f) | ||
5114 | m_host.CollisionSoundType = 0; // full return to default sounds | ||
5115 | else | ||
5116 | m_host.CollisionSoundType = 2; // default sounds with volume | ||
5117 | return; | 5112 | return; |
5118 | } | 5113 | } |
5114 | |||
5119 | // TODO: Parameter check logic required. | 5115 | // TODO: Parameter check logic required. |
5120 | m_host.CollisionSound = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, impact_sound, AssetType.Sound); | 5116 | UUID soundId = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, impact_sound, AssetType.Sound); |
5121 | m_host.CollisionSoundVolume = (float)impact_volume; | 5117 | if(soundId != UUID.Zero) |
5122 | m_host.CollisionSoundType = 1; | 5118 | { |
5119 | m_host.CollisionSound = soundId; | ||
5120 | m_host.CollisionSoundVolume = (float)impact_volume; | ||
5121 | m_host.CollisionSoundType = 1; | ||
5122 | } | ||
5123 | else | ||
5124 | m_host.CollisionSoundType = -1; | ||
5123 | } | 5125 | } |
5124 | 5126 | ||
5125 | public LSL_String llGetAnimation(string id) | 5127 | public LSL_String llGetAnimation(string id) |