add llLinkSetSoundQueueing and llLinkSetSoundRadius

This commit is contained in:
UbitUmarov
2023-02-09 10:55:44 +00:00
parent bc2590c82d
commit 8706ea8a92
4 changed files with 108 additions and 76 deletions

View File

@@ -6758,6 +6758,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.SoundRadius = radius;
}
public void llLinkSetSoundRadius(int linknumber, double radius)
{
foreach (SceneObjectPart sop in GetLinkParts(linknumber))
sop.SoundRadius = radius;
}
public LSL_String llKey2Name(LSL_Key id)
{
if (UUID.TryParse(id, out UUID key) && key.IsNotZero())
@@ -16999,19 +17005,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// This does nothing for LSO scripts in SL
}
public void llSetSoundQueueing(int queue)
{
if (m_SoundModule != null)
m_SoundModule.SetSoundQueueing(m_host.UUID, queue == ScriptBaseClass.TRUE.value);
}
public void llLinkSetSoundQueueing(int linknumber, int queue)
{
if (m_SoundModule != null)
{
foreach (SceneObjectPart sop in GetLinkParts(linknumber))
m_SoundModule.SetSoundQueueing(sop.UUID, queue == ScriptBaseClass.TRUE.value);
}
}
#region Not Implemented
//
// Listing the unimplemented lsl functions here, please move
// them from this region as they are completed
//
public void llSetSoundQueueing(int queue)
{
if (m_SoundModule != null)
m_SoundModule.SetSoundQueueing(m_host.UUID, queue == ScriptBaseClass.TRUE.value);
}
public void llCollisionSprite(LSL_String impact_sprite)
{
// Viewer 2.0 broke this and it's likely LL has no intention

View File

@@ -492,5 +492,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
void llLinkAdjustSoundVolume(LSL_Integer linknumber, LSL_Float volume);
void llLinkStopSound(LSL_Integer linknumber);
void llLinkPlaySound(LSL_Integer linknumber, string sound, double volume);
void llLinkSetSoundQueueing(int linknumber, int queue);
void llLinkSetSoundRadius(int linknumber, double radius);
}
}

View File

@@ -2232,5 +2232,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
{
m_LSL_Functions.llLinkPlaySound(linknumber, sound, volume);
}
public void llLinkSetSoundQueueing(int linknumber, int queue)
{
m_LSL_Functions.llLinkSetSoundQueueing(linknumber, queue);
}
public void llLinkSetSoundRadius(int linknumber, double radius)
{
m_LSL_Functions.llLinkSetSoundRadius(linknumber, radius);
}
}
}