mirror of
https://github.com/opensim/opensim.git
synced 2026-05-15 11:25:39 +08:00
shuffling code around so that the interface for ISoundModule.SendSound() specifies a UUID rather than a string
This commit is contained in:
committed by
Justin Clark-Casey (justincc)
parent
5abcecc735
commit
c5af16aef8
@@ -278,10 +278,13 @@ namespace OpenSim.Region.CoreModules.World.Sound
|
||||
m_host.SendFullUpdateToAllClients();
|
||||
}
|
||||
|
||||
public void SendSound(UUID objectID, string sound, double volume,
|
||||
public void SendSound(UUID objectID, UUID soundID, double volume,
|
||||
bool triggered, byte flags, float radius, bool useMaster,
|
||||
bool isMaster)
|
||||
{
|
||||
if (soundID == UUID.Zero)
|
||||
return;
|
||||
|
||||
SceneObjectPart part;
|
||||
if (!m_scene.TryGetSceneObjectPart(objectID, out part))
|
||||
return;
|
||||
@@ -290,29 +293,9 @@ namespace OpenSim.Region.CoreModules.World.Sound
|
||||
|
||||
UUID parentID = part.ParentGroup.UUID;
|
||||
|
||||
UUID soundID = UUID.Zero;
|
||||
Vector3 position = part.AbsolutePosition; // region local
|
||||
ulong regionHandle = m_scene.RegionInfo.RegionHandle;
|
||||
|
||||
if (!UUID.TryParse(sound, out soundID))
|
||||
{
|
||||
// search sound file from inventory
|
||||
lock (part.TaskInventory)
|
||||
{
|
||||
foreach (KeyValuePair<UUID, TaskInventoryItem> item in part.TaskInventory)
|
||||
{
|
||||
if (item.Value.Type == (int)AssetType.Sound && item.Value.Name == sound)
|
||||
{
|
||||
soundID = item.Value.ItemID;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (soundID == UUID.Zero)
|
||||
return;
|
||||
|
||||
if (useMaster)
|
||||
{
|
||||
if (isMaster)
|
||||
|
||||
Reference in New Issue
Block a user