refactoring llCollisionSound to use new KeyOrName method
parent
a9999a9676
commit
dcac2a7f71
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue