Merge branch 'master' of /var/git/opensim/

viewer-2-initial-appearance
opensim mirror account 2010-11-17 11:20:09 -08:00
commit 01c16fc8c8
2 changed files with 16 additions and 9 deletions

View File

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

View File

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