mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Refactoring llTriggerSoundLimited with a new method on ISoundModule, as the LL Wiki spec for llTriggerSoundLimited states an axis-aligned bounding box, not radial constraint
This commit is contained in:
committed by
Justin Clark-Casey (justincc)
parent
56965dd959
commit
a9999a9676
@@ -5876,12 +5876,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_host.AddScriptLPS(1);
|
||||
if (m_SoundModule != null)
|
||||
{
|
||||
double radius1 = VecDist(m_host.GetWorldPosition(), top_north_east);
|
||||
double radius2 = VecDist(m_host.GetWorldPosition(), bottom_south_west);
|
||||
double radius = Math.Abs(radius1 - radius2);
|
||||
m_SoundModule.SendSound(m_host.UUID,
|
||||
KeyOrName(sound, AssetType.Sound), volume, true, 0,
|
||||
(float)radius, false, false);
|
||||
m_SoundModule.TriggerSoundLimited(m_host.UUID,
|
||||
KeyOrName(sound, AssetType.Sound), volume,
|
||||
bottom_south_west, top_north_east);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user