diff options
author | SignpostMarv | 2012-10-05 15:16:30 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-10-29 23:38:58 +0000 |
commit | a68e2fe1692a7611c58f774ac5b94c4298343433 (patch) | |
tree | a26fdba2a74fc1579a9dab1eed79773a4d7567b7 /OpenSim/Region/CoreModules/World | |
parent | transposing stop sound into sound module (diff) | |
download | opensim-SC_OLD-a68e2fe1692a7611c58f774ac5b94c4298343433.zip opensim-SC_OLD-a68e2fe1692a7611c58f774ac5b94c4298343433.tar.gz opensim-SC_OLD-a68e2fe1692a7611c58f774ac5b94c4298343433.tar.bz2 opensim-SC_OLD-a68e2fe1692a7611c58f774ac5b94c4298343433.tar.xz |
transposing preload sound onto sound module
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs index 670794d..0225d6f 100644 --- a/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs +++ b/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs | |||
@@ -25,6 +25,7 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | using System; | 27 | using System; |
28 | using System.Collections.Generic; | ||
28 | using System.Reflection; | 29 | using System.Reflection; |
29 | 30 | ||
30 | using Nini.Config; | 31 | using Nini.Config; |
@@ -223,6 +224,25 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
223 | } | 224 | } |
224 | } | 225 | } |
225 | 226 | ||
227 | public virtual void PreloadSound(UUID soundID, UUID objectID, float radius) | ||
228 | { | ||
229 | SceneObjectPart part; | ||
230 | if (soundID == UUID.Zero | ||
231 | || !m_scene.TryGetSceneObjectPart(objectID, out part)) | ||
232 | { | ||
233 | return; | ||
234 | } | ||
235 | |||
236 | if (radius == 0) | ||
237 | radius = MaxDistance; | ||
238 | |||
239 | m_scene.ForEachRootScenePresence(delegate(ScenePresence sp) | ||
240 | { | ||
241 | if (!(Util.GetDistanceTo(sp.AbsolutePosition, part.AbsolutePosition) >= MaxDistance)) | ||
242 | sp.ControllingClient.SendPreLoadSound(objectID, objectID, soundID); | ||
243 | }); | ||
244 | } | ||
245 | |||
226 | #endregion | 246 | #endregion |
227 | } | 247 | } |
228 | } | 248 | } |