aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World
diff options
context:
space:
mode:
authorSignpostMarv2012-10-06 22:23:14 +0100
committerJustin Clark-Casey (justincc)2012-10-29 23:38:59 +0000
commit29a8ae48b51de55a02f839b6e4566054ad3f7f58 (patch)
treea9b27473da15d2aa16102322fcfe7f0d42bacb9d /OpenSim/Region/CoreModules/World
parenttransposing preload sound onto sound module (diff)
downloadopensim-SC-29a8ae48b51de55a02f839b6e4566054ad3f7f58.zip
opensim-SC-29a8ae48b51de55a02f839b6e4566054ad3f7f58.tar.gz
opensim-SC-29a8ae48b51de55a02f839b6e4566054ad3f7f58.tar.bz2
opensim-SC-29a8ae48b51de55a02f839b6e4566054ad3f7f58.tar.xz
transposing LoopSoundMaster to Sound Module
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r--OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs36
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}