mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
refactoring llCollisionSound to use new KeyOrName method
This commit is contained in:
committed by
Justin Clark-Casey (justincc)
parent
a9999a9676
commit
dcac2a7f71
@@ -4342,16 +4342,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
// TODO: Parameter check logic required.
|
||||
UUID soundId = UUID.Zero;
|
||||
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.CollisionSound = KeyOrName(impact_sound, AssetType.Sound);
|
||||
m_host.CollisionSoundVolume = (float)impact_volume;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user