Fix script error when audio is disabled

This was SVN commit r7567.
This commit is contained in:
Ykkrosh 2010-05-22 14:29:55 +00:00
parent f902803af2
commit 739b25dc22

View File

@ -9,9 +9,13 @@ var g_CurrentMusic = null;
function startMusic()
{
var ambient1 = new Sound("audio/ambient/dayscape/day_temperate_gen_03.ogg");
ambient1.loop();
ambient1.setGain(0.8);
var gain = 0.3;
if (ambient1)
{
ambient1.loop();
ambient1.setGain(0.8);
}
var gain = 0.3;
g_CurrentMusic = new Sound("audio/music/germanic_peace_1.ogg");
if (g_CurrentMusic)
{