aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs22
1 files changed, 17 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index c479944..f29be92 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2367,7 +2367,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2367 m_host.AddScriptLPS(1); 2367 m_host.AddScriptLPS(1);
2368 2368
2369 // send the sound, once, to all clients in range 2369 // send the sound, once, to all clients in range
2370 m_host.SendSound(KeyOrName(sound).ToString(), volume, false, 0, 0, false, false); 2370 if (m_SoundModule != null)
2371 {
2372 m_SoundModule.SendSound(m_host.UUID, KeyOrName(sound).ToString(), volume, false, 0, 0, false, false);
2373 }
2371 } 2374 }
2372 2375
2373 public void llLoopSound(string sound, double volume) 2376 public void llLoopSound(string sound, double volume)
@@ -2404,14 +2407,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2404 m_host.AddScriptLPS(1); 2407 m_host.AddScriptLPS(1);
2405 2408
2406 // send the sound, once, to all clients in range 2409 // send the sound, once, to all clients in range
2407 m_host.SendSound(KeyOrName(sound).ToString(), volume, false, 0, 0, true, false); 2410 if (m_SoundModule != null)
2411 {
2412 m_SoundModule.SendSound(m_host.UUID, KeyOrName(sound).ToString(), volume, false, 0, 0, true, false);
2413 }
2408 } 2414 }
2409 2415
2410 public void llTriggerSound(string sound, double volume) 2416 public void llTriggerSound(string sound, double volume)
2411 { 2417 {
2412 m_host.AddScriptLPS(1); 2418 m_host.AddScriptLPS(1);
2413 // send the sound, once, to all clients in range 2419 // send the sound, once, to all clients in rangeTrigger or play an attached sound in this part's inventory.
2414 m_host.SendSound(KeyOrName(sound).ToString(), volume, true, 0, 0, false, false); 2420 if (m_SoundModule != null)
2421 {
2422 m_SoundModule.SendSound(m_host.UUID, KeyOrName(sound).ToString(), volume, true, 0, 0, false, false);
2423 }
2415 } 2424 }
2416 2425
2417 public void llStopSound() 2426 public void llStopSound()
@@ -5824,10 +5833,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5824 LSL_Vector bottom_south_west) 5833 LSL_Vector bottom_south_west)
5825 { 5834 {
5826 m_host.AddScriptLPS(1); 5835 m_host.AddScriptLPS(1);
5836 if (m_SoundModule != null)
5837 {
5827 float radius1 = (float)llVecDist(llGetPos(), top_north_east); 5838 float radius1 = (float)llVecDist(llGetPos(), top_north_east);
5828 float radius2 = (float)llVecDist(llGetPos(), bottom_south_west); 5839 float radius2 = (float)llVecDist(llGetPos(), bottom_south_west);
5829 float radius = Math.Abs(radius1 - radius2); 5840 float radius = Math.Abs(radius1 - radius2);
5830 m_host.SendSound(KeyOrName(sound).ToString(), volume, true, 0, radius, false, false); 5841 m_SoundModule.SendSound(m_host.UUID, KeyOrName(sound).ToString(), volume, true, 0, radius, false, false);
5842 }
5831 } 5843 }
5832 5844
5833 public void llEjectFromLand(string pest) 5845 public void llEjectFromLand(string pest)