diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Sound/SoundModule.cs | 20 |
2 files changed, 16 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 8d85d1a..7851c4d 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -6016,8 +6016,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6016 | SoundTrigger handlerSoundTrigger = OnSoundTrigger; | 6016 | SoundTrigger handlerSoundTrigger = OnSoundTrigger; |
6017 | if (handlerSoundTrigger != null) | 6017 | if (handlerSoundTrigger != null) |
6018 | { | 6018 | { |
6019 | handlerSoundTrigger(soundTriggerPacket.SoundData.SoundID, soundTriggerPacket.SoundData.OwnerID, | 6019 | // UUIDS are sent as zeroes by the client, substitute agent's id |
6020 | soundTriggerPacket.SoundData.ObjectID, soundTriggerPacket.SoundData.ParentID, | 6020 | handlerSoundTrigger(soundTriggerPacket.SoundData.SoundID, AgentId, |
6021 | AgentId, AgentId, | ||
6021 | soundTriggerPacket.SoundData.Gain, soundTriggerPacket.SoundData.Position, | 6022 | soundTriggerPacket.SoundData.Gain, soundTriggerPacket.SoundData.Position, |
6022 | soundTriggerPacket.SoundData.Handle, 0); | 6023 | soundTriggerPacket.SoundData.Handle, 0); |
6023 | 6024 | ||
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs index abd28c8..8df44fe 100644 --- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs +++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs | |||
@@ -106,14 +106,20 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
106 | { | 106 | { |
107 | SceneObjectPart part = m_scene.GetSceneObjectPart(objectID); | 107 | SceneObjectPart part = m_scene.GetSceneObjectPart(objectID); |
108 | if (part == null) | 108 | if (part == null) |
109 | return; | ||
110 | |||
111 | SceneObjectGroup grp = part.ParentGroup; | ||
112 | |||
113 | if (grp.IsAttachment && grp.GetAttachmentPoint() > 30) | ||
114 | { | 109 | { |
115 | objectID = ownerID; | 110 | ScenePresence sp; |
116 | parentID = ownerID; | 111 | if (!m_scene.TryGetScenePresence(objectID, out sp)) |
112 | return; | ||
113 | } | ||
114 | else | ||
115 | { | ||
116 | SceneObjectGroup grp = part.ParentGroup; | ||
117 | |||
118 | if (grp.IsAttachment && grp.GetAttachmentPoint() > 30) | ||
119 | { | ||
120 | objectID = ownerID; | ||
121 | parentID = ownerID; | ||
122 | } | ||
117 | } | 123 | } |
118 | 124 | ||
119 | m_scene.ForEachScenePresence(delegate(ScenePresence sp) | 125 | m_scene.ForEachScenePresence(delegate(ScenePresence sp) |