diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Sound')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs index 0225d6f..4912ed8 100644 --- a/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs +++ b/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs | |||
@@ -243,6 +243,42 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
243 | }); | 243 | }); |
244 | } | 244 | } |
245 | 245 | ||
246 | public virtual void LoopSoundMaster(UUID objectID, UUID soundID, | ||
247 | double volume, double radius) | ||
248 | { | ||
249 | SceneObjectPart m_host; | ||
250 | if (!m_scene.TryGetSceneObjectPart(objectID, out m_host)) | ||
251 | return; | ||
252 | |||
253 | m_host.ParentGroup.LoopSoundMasterPrim = m_host; | ||
254 | lock (m_host.ParentGroup.LoopSoundSlavePrims) | ||
255 | { | ||
256 | foreach (SceneObjectPart prim in m_host.ParentGroup.LoopSoundSlavePrims) | ||
257 | { | ||
258 | if (prim.Sound != UUID.Zero) | ||
259 | StopSound(objectID); | ||
260 | |||
261 | prim.Sound = soundID; | ||
262 | prim.SoundGain = volume; | ||
263 | prim.SoundFlags = 1; // looping | ||
264 | prim.SoundRadius = radius; | ||
265 | |||
266 | prim.ScheduleFullUpdate(); | ||
267 | prim.SendFullUpdateToAllClients(); | ||
268 | } | ||
269 | } | ||
270 | if (m_host.Sound != UUID.Zero) | ||
271 | StopSound(objectID); | ||
272 | |||
273 | m_host.Sound = soundID; | ||
274 | m_host.SoundGain = volume; | ||
275 | m_host.SoundFlags = 1; // looping | ||
276 | m_host.SoundRadius = radius; | ||
277 | |||
278 | m_host.ScheduleFullUpdate(); | ||
279 | m_host.SendFullUpdateToAllClients(); | ||
280 | } | ||
281 | |||
246 | #endregion | 282 | #endregion |
247 | } | 283 | } |
248 | } | 284 | } |