diff options
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b52ebac..ff4b690 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4290,18 +4290,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4290 | UUID soundId = UUID.Zero; | 4290 | UUID soundId = UUID.Zero; |
4291 | if (!UUID.TryParse(impact_sound, out soundId)) | 4291 | if (!UUID.TryParse(impact_sound, out soundId)) |
4292 | { | 4292 | { |
4293 | lock (m_host.TaskInventory) | 4293 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(impact_sound); |
4294 | { | 4294 | |
4295 | foreach (TaskInventoryItem item in m_host.TaskInventory.Values) | 4295 | if (item != null && item.Type == (int)AssetType.Sound) |
4296 | { | 4296 | soundId = item.AssetID; |
4297 | if (item.Type == (int)AssetType.Sound && item.Name == impact_sound) | ||
4298 | { | ||
4299 | soundId = item.AssetID; | ||
4300 | break; | ||
4301 | } | ||
4302 | } | ||
4303 | } | ||
4304 | } | 4297 | } |
4298 | |||
4305 | m_host.CollisionSound = soundId; | 4299 | m_host.CollisionSound = soundId; |
4306 | m_host.CollisionSoundVolume = (float)impact_volume; | 4300 | m_host.CollisionSoundVolume = (float)impact_volume; |
4307 | } | 4301 | } |