public void llLoopSound(string sound, double volume)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return;
if (m_host.Sound == KeyOrName(sound, true))
return;
if (m_host.Sound != UUID.Zero)
llStopSound();
m_host.Sound = KeyOrName(sound, true);
m_host.SoundGain = volume;
m_host.SoundFlags = (byte)SoundFlags.Loop; // looping
if (m_host.SoundRadius == 0)
m_host.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable?
m_host.ScheduleUpdate(PrimUpdateFlags.FindBest);
}