aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorCharles Krinke2008-05-30 16:37:17 +0000
committerCharles Krinke2008-05-30 16:37:17 +0000
commit84b4158205db7b3d24ae7be97f7c509cb5e7429b (patch)
treef0058803f2ccb548f2f1ac4ff67933ebd0e2cfec /OpenSim
parent* Stop the IRC module throwing a nre on shutdown if it isn't actually being used (diff)
downloadopensim-SC_OLD-84b4158205db7b3d24ae7be97f7c509cb5e7429b.zip
opensim-SC_OLD-84b4158205db7b3d24ae7be97f7c509cb5e7429b.tar.gz
opensim-SC_OLD-84b4158205db7b3d24ae7be97f7c509cb5e7429b.tar.bz2
opensim-SC_OLD-84b4158205db7b3d24ae7be97f7c509cb5e7429b.tar.xz
Mantis#1422. Thank you kindly, Xantor for your llLoopSound()
patch and I apologize for my confusion with the interim patch earlier.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 5b1408f..e5167aa 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -1432,15 +1432,20 @@ namespace OpenSim.Region.ScriptEngine.Common
1432 // or when the prim gets moved, changed, sat on, whatever 1432 // or when the prim gets moved, changed, sat on, whatever
1433 // see large number of mantises (mantes?) 1433 // see large number of mantises (mantes?)
1434 // 20080530 Updated to remove code duplication 1434 // 20080530 Updated to remove code duplication
1435 // 20080530 Stop sound if there is one, otherwise volume only changes don't work
1435 public void llLoopSound(string sound, double volume) 1436 public void llLoopSound(string sound, double volume)
1436 { 1437 {
1437 m_host.AddScriptLPS(1); 1438 m_host.AddScriptLPS(1);
1438 1439
1440 if (m_host.Sound != LLUUID.Zero)
1441 llStopSound();
1442
1439 m_host.Sound = KeyOrName(sound); 1443 m_host.Sound = KeyOrName(sound);
1440 m_host.SoundGain = volume; 1444 m_host.SoundGain = volume;
1441 m_host.SoundFlags = 1; // looping 1445 m_host.SoundFlags = 1; // looping
1442 m_host.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable? 1446 m_host.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable?
1443 1447
1448 m_host.ScheduleFullUpdate();
1444 m_host.SendFullUpdateToAllClients(); 1449 m_host.SendFullUpdateToAllClients();
1445 } 1450 }
1446 1451
@@ -1478,6 +1483,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1478 m_host.SoundFlags = 0; 1483 m_host.SoundFlags = 0;
1479 m_host.SoundRadius = 0; 1484 m_host.SoundRadius = 0;
1480 1485
1486 m_host.ScheduleFullUpdate();
1481 m_host.SendFullUpdateToAllClients(); 1487 m_host.SendFullUpdateToAllClients();
1482 1488
1483 // m_host.SendSound(LLUUID.Zero.ToString(), 1.0, false, 2); 1489 // m_host.SendSound(LLUUID.Zero.ToString(), 1.0, false, 2);