Fix gesture and viewer preview sounds not playing

avinationmerge
Melanie 2010-11-17 17:54:32 +01:00
parent 80d3998001
commit 2e5ae1b013
2 changed files with 16 additions and 9 deletions

View File

@ -6047,8 +6047,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
SoundTrigger handlerSoundTrigger = OnSoundTrigger;
if (handlerSoundTrigger != null)
{
handlerSoundTrigger(soundTriggerPacket.SoundData.SoundID, soundTriggerPacket.SoundData.OwnerID,
soundTriggerPacket.SoundData.ObjectID, soundTriggerPacket.SoundData.ParentID,
// UUIDS are sent as zeroes by the client, substitute agent's id
handlerSoundTrigger(soundTriggerPacket.SoundData.SoundID, AgentId,
AgentId, AgentId,
soundTriggerPacket.SoundData.Gain, soundTriggerPacket.SoundData.Position,
soundTriggerPacket.SoundData.Handle, 0);

View File

@ -106,14 +106,20 @@ namespace OpenSim.Region.CoreModules.World.Sound
{
SceneObjectPart part = m_scene.GetSceneObjectPart(objectID);
if (part == null)
return;
SceneObjectGroup grp = part.ParentGroup;
if (grp.IsAttachment && grp.GetAttachmentPoint() > 30)
{
objectID = ownerID;
parentID = ownerID;
ScenePresence sp;
if (!m_scene.TryGetScenePresence(objectID, out sp))
return;
}
else
{
SceneObjectGroup grp = part.ParentGroup;
if (grp.IsAttachment && grp.GetAttachmentPoint() > 30)
{
objectID = ownerID;
parentID = ownerID;
}
}
m_scene.ForEachScenePresence(delegate(ScenePresence sp)