refactoring llCollisionSound to use new KeyOrName method

integration
SignpostMarv 2012-10-16 13:27:03 +01:00 committed by Justin Clark-Casey (justincc)
parent a9999a9676
commit dcac2a7f71
1 changed files with 1 additions and 10 deletions

View File

@ -4342,16 +4342,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
// TODO: Parameter check logic required. // TODO: Parameter check logic required.
UUID soundId = UUID.Zero; m_host.CollisionSound = KeyOrName(impact_sound, AssetType.Sound);
if (!UUID.TryParse(impact_sound, out soundId))
{
TaskInventoryItem item = m_host.Inventory.GetInventoryItem(impact_sound);
if (item != null && item.Type == (int)AssetType.Sound)
soundId = item.AssetID;
}
m_host.CollisionSound = soundId;
m_host.CollisionSoundVolume = (float)impact_volume; m_host.CollisionSoundVolume = (float)impact_volume;
} }