aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs42
1 files changed, 5 insertions, 37 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 7fa01c1..25be3ff 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -107,6 +107,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
107 protected IUrlModule m_UrlModule = null; 107 protected IUrlModule m_UrlModule = null;
108 protected Dictionary<UUID, UserInfoCacheEntry> m_userInfoCache = new Dictionary<UUID, UserInfoCacheEntry>(); 108 protected Dictionary<UUID, UserInfoCacheEntry> m_userInfoCache = new Dictionary<UUID, UserInfoCacheEntry>();
109 protected int EMAIL_PAUSE_TIME = 20; // documented delay value for smtp. 109 protected int EMAIL_PAUSE_TIME = 20; // documented delay value for smtp.
110 protected ISoundModule m_SoundModule = null;
110 111
111 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item) 112 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item)
112 { 113 {
@@ -119,6 +120,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
119 m_TransferModule = 120 m_TransferModule =
120 m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>(); 121 m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>();
121 m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>(); 122 m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>();
123 m_SoundModule = m_ScriptEngine.World.RequestModuleInterface<ISoundModule>();
122 124
123 AsyncCommands = new AsyncCommandManager(ScriptEngine); 125 AsyncCommands = new AsyncCommandManager(ScriptEngine);
124 } 126 }
@@ -2451,43 +2453,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2451 public void llStopSound() 2453 public void llStopSound()
2452 { 2454 {
2453 m_host.AddScriptLPS(1); 2455 m_host.AddScriptLPS(1);
2454 m_host.AdjustSoundGain(0); 2456
2455 // Xantor 20080528: Clear prim data of sound instead 2457 if (m_SoundModule != null)
2456 if (m_host.ParentGroup.LoopSoundSlavePrims.Contains(m_host)) 2458 m_SoundModule.StopSound(m_host.UUID);
2457 {
2458 if (m_host.ParentGroup.LoopSoundMasterPrim == m_host)
2459 {
2460 foreach (SceneObjectPart part in m_host.ParentGroup.LoopSoundSlavePrims)
2461 {
2462 part.Sound = UUID.Zero;
2463 part.SoundGain = 0;
2464 part.SoundFlags = 0;
2465 part.SoundRadius = 0;
2466 part.ScheduleFullUpdate();
2467 part.SendFullUpdateToAllClients();
2468 }
2469 m_host.ParentGroup.LoopSoundMasterPrim = null;
2470 m_host.ParentGroup.LoopSoundSlavePrims.Clear();
2471 }
2472 else
2473 {
2474 m_host.Sound = UUID.Zero;
2475 m_host.SoundGain = 0;
2476 m_host.SoundFlags = 0;
2477 m_host.SoundRadius = 0;
2478 m_host.ScheduleFullUpdate();
2479 m_host.SendFullUpdateToAllClients();
2480 }
2481 }
2482 else
2483 {
2484 m_host.Sound = UUID.Zero;
2485 m_host.SoundGain = 0;
2486 m_host.SoundFlags = 0;
2487 m_host.SoundRadius = 0;
2488 m_host.ScheduleFullUpdate();
2489 m_host.SendFullUpdateToAllClients();
2490 }
2491 } 2459 }
2492 2460
2493 public void llPreloadSound(string sound) 2461 public void llPreloadSound(string sound)