pause music and ambient sounds when game pauses

This was SVN commit r13347.
This commit is contained in:
stwf
2013-04-07 04:13:15 +00:00
parent 555f06acbe
commit c9a5d5cee5
7 changed files with 79 additions and 1 deletions
+2
View File
@@ -53,6 +53,7 @@
#include "renderer/Renderer.h"
#include "scriptinterface/ScriptInterface.h"
#include "simulation2/Simulation2.h"
#include "soundmanager/SoundManager.h"
// rationale: the function table is now at the end of the source file to
// avoid the need for forward declarations for every function.
@@ -340,6 +341,7 @@ JSBool SetPaused(JSContext* cx, uintN argc, jsval* vp)
try
{
g_Game->m_Paused = ToPrimitive<bool> (JS_ARGV(cx, vp)[0]);
g_SoundManager->Pause(g_Game->m_Paused);
}
catch (PSERROR_Scripting_ConversionFailed)
{