/*
//////////////////////////////////////
//Pierrambo //pierrambo@pierrambo.fr//
//////////////////////////////////////
*/

main()
{
	precacheFX();
        ambientFX();
        level.scr_sound["radio_explose"] = "building_explosion1";
	level.scr_sound["vitre_explode"] = "carro_explose";
}


precacheFX()
{
        level._effect["flak_explosion"]	= loadfx("fx/explosions/flak88_explosion.efx");
        level._effect["porte_explosion"] = loadfx("fx/explose/destruc_porte.efx");
	  level._effect["cassevitre"] = loadfx ("fx/explose/vitre_explo.efx");
        level._effect["tombefeuille"] = loadfx ("fx/impacts/feuilletombe.efx");
        level._effect["eaufont"] = loadfx ("fx/misc/comm_font2.efx");
        level._effect["cendrier"] = loadfx ("fx/misc/cigar.efx");
        level._effect["impacteau"] = loadfx ("fx/impacts/flotte_impact.efx");
        level._effect["jetdo"] = loadfx ("fx/impacts/jetdeau.efx");
	  if(level.wwx_ambfirefx) level._effect["feucheminee"] = loadfx ("fx/fire/feu_chem.efx");
	  if(level.wwx_ambsmokefx) level._effect["fumecheminee"] = loadfx ("fx/smoke/thin_light_smoke_S.efx");
        if(level.wwx_ambfogbankfx) level._effect["fogbank_small_duhoc"] = loadfx ("fx/misc/fogbank_small_duhoc.efx");
	  if(level.wwx_ambfliesfx) level._effect["mouche_cheval"] = loadfx ("fx/misc/insects_carcass_flies.efx");
}


ambientFX()
{
        maps\mp\_fx::loopfx("eaufont", (-1536,-3872,401), .3);
        maps\mp\_fx::loopfx("jetdo", (-1536,-3872,380), .3);
        maps\mp\_fx::loopfx("impacteau", (-1503,-3824,320), .2);
        maps\mp\_fx::loopfx("impacteau", (-1473,-3864,320), .8);
        maps\mp\_fx::loopfx("impacteau", (-1491,-3890,320), .5);
        maps\mp\_fx::loopfx("impacteau", (-1523,-3929,320), .4);
        maps\mp\_fx::loopfx("impacteau", (-1570,-3935,320), .8);
        maps\mp\_fx::loopfx("impacteau", (-1593,-3882,320), .7);
        maps\mp\_fx::loopfx("impacteau", (-1597,-3830,320), .9);
        maps\mp\_fx::loopfx("impacteau", (-1555,-3820,320), .3);
	if(level.wwx_ambfirefx)
      {
      maps\mp\_fx::loopfx("feucheminee", (-1973, -5160, 315), .3);
	maps\mp\_fx::soundfx("medfire", (-1973, -5160, 320));
      }
       if(level.wwx_ambsmokefx) maps\mp\_fx::loopfx("fumecheminee", (-1973, -5160, 1099), .5);
	if(level.wwx_ambfogbankfx) maps\mp\_fx::loopfx("cendrier", (-1885, -4888, 480), .5);
	if(level.wwx_ambfliesfx) maps\mp\_fx::loopfx("mouche_cheval", (-132, -2380, 316), 0.2, (-132, -2380, 326));
}

