aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs')
-rw-r--r--OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs45
1 files changed, 45 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs
index f0e446f..670794d 100644
--- a/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs
+++ b/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs
@@ -178,6 +178,51 @@ namespace OpenSim.Region.CoreModules.World.Sound
178 }); 178 });
179 } 179 }
180 180
181 public virtual void StopSound(UUID objectID)
182 {
183 SceneObjectPart m_host;
184 if (!m_scene.TryGetSceneObjectPart(objectID, out m_host))
185 return;
186
187 m_host.AdjustSoundGain(0);
188 // Xantor 20080528: Clear prim data of sound instead
189 if (m_host.ParentGroup.LoopSoundSlavePrims.Contains(m_host))
190 {
191 if (m_host.ParentGroup.LoopSoundMasterPrim == m_host)
192 {
193 foreach (SceneObjectPart part in m_host.ParentGroup.LoopSoundSlavePrims)
194 {
195 part.Sound = UUID.Zero;
196 part.SoundGain = 0;
197 part.SoundFlags = 0;
198 part.SoundRadius = 0;
199 part.ScheduleFullUpdate();
200 part.SendFullUpdateToAllClients();
201 }
202 m_host.ParentGroup.LoopSoundMasterPrim = null;
203 m_host.ParentGroup.LoopSoundSlavePrims.Clear();
204 }
205 else
206 {
207 m_host.Sound = UUID.Zero;
208 m_host.SoundGain = 0;
209 m_host.SoundFlags = 0;
210 m_host.SoundRadius = 0;
211 m_host.ScheduleFullUpdate();
212 m_host.SendFullUpdateToAllClients();
213 }
214 }
215 else
216 {
217 m_host.Sound = UUID.Zero;
218 m_host.SoundGain = 0;
219 m_host.SoundFlags = 0;
220 m_host.SoundRadius = 0;
221 m_host.ScheduleFullUpdate();
222 m_host.SendFullUpdateToAllClients();
223 }
224 }
225
181 #endregion 226 #endregion
182 } 227 }
183} 228}