diff options
author | SignpostMarv | 2012-10-16 13:27:03 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-10-29 23:39:01 +0000 |
commit | dcac2a7f716e512b604cce02768770e1660600eb (patch) | |
tree | b3d479547b596435844bf13424dba979c53c8c14 | |
parent | Refactoring llTriggerSoundLimited with a new method on ISoundModule, as the L... (diff) | |
download | opensim-SC-dcac2a7f716e512b604cce02768770e1660600eb.zip opensim-SC-dcac2a7f716e512b604cce02768770e1660600eb.tar.gz opensim-SC-dcac2a7f716e512b604cce02768770e1660600eb.tar.bz2 opensim-SC-dcac2a7f716e512b604cce02768770e1660600eb.tar.xz |
refactoring llCollisionSound to use new KeyOrName method
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index aeb74a5..0fa247d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4342,16 +4342,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4342 | m_host.AddScriptLPS(1); | 4342 | m_host.AddScriptLPS(1); |
4343 | 4343 | ||
4344 | // TODO: Parameter check logic required. | 4344 | // TODO: Parameter check logic required. |
4345 | UUID soundId = UUID.Zero; | 4345 | m_host.CollisionSound = KeyOrName(impact_sound, AssetType.Sound); |
4346 | if (!UUID.TryParse(impact_sound, out soundId)) | ||
4347 | { | ||
4348 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(impact_sound); | ||
4349 | |||
4350 | if (item != null && item.Type == (int)AssetType.Sound) | ||
4351 | soundId = item.AssetID; | ||
4352 | } | ||
4353 | |||
4354 | m_host.CollisionSound = soundId; | ||
4355 | m_host.CollisionSoundVolume = (float)impact_volume; | 4346 | m_host.CollisionSoundVolume = (float)impact_volume; |
4356 | } | 4347 | } |
4357 | 4348 | ||