main()
{
	precacheFX();
	ambientFX();
	level.scr_sound["flak88_explode"]	= "flak88_explode"; 
}

precacheFX()
{
	level._effect["flak_explosion"]				= loadfx ("fx/explosions/flak88_explosion.efx");

      if(level.wwx_ambsnowfx)
      {
	level._effect["snow_light"]				= loadfx ("fx/misc/snow_light_mp_downtown.efx");
	level._effect["snow_wind_cityhall"]			= loadfx ("fx/misc/snow_wind_cityhall.efx");
      }
 
      if(level.wwx_ambsmokefx)
      {
	level._effect["thin_black_smoke_S"]			= loadfx ("fx/smoke/thin_black_smoke_S.efx");
	level._effect["thin_black_smoke_M"]			= loadfx ("fx/smoke/thin_black_smoke_M.efx");
	level._effect["battlefield_smokebank_S"]		= loadfx ("fx/smoke/battlefield_smokebank_S.efx");	
      }

      if(level.wwx_ambfogbankfx)
      {
	level._effect["fogbank_large_duhoc"]			= loadfx ("fx/misc/fogbank_large_duhoc.efx");
	level._effect["fogbank_small_duhoc"]			= loadfx ("fx/misc/fogbank_small_duhoc.efx");
      }
 
      if(level.wwx_ambfirefx)
      {
	level._effect["tank_fire_engine"] 			= loadfx ("fx/fire/tank_fire_engine.efx");
	level._effect["building_fire_large"]			= loadfx ("fx/fire/building_fire_large.efx");
      }
 
	if(level.wwx_ambfliesfx) level._effect["insects_carcass_flies"]			= loadfx ("fx/misc/insects_carcass_flies.efx");
}


ambientFX()
{
	
	
	//interrior fog
      if(level.wwx_ambfogbankfx)
      {
	maps\mp\_fx::loopfx("fogbank_small_duhoc", (-1456, -8, 10), 2, (1456, -8, 150));
	maps\mp\_fx::loopfx("fogbank_small_duhoc", (-1680, -728, 10), 2, (-1680, -728, 150));
	maps\mp\_fx::loopfx("fogbank_small_duhoc", (176, 1648, 10), 2, (176, 1648, 130));
	maps\mp\_fx::loopfx("fogbank_large_duhoc", (-1528, 240, 20), 2, (-1528, 240, 150));
      }

      if(level.wwx_ambsmokefx)
      {
	maps\mp\_fx::loopfx("battlefield_smokebank_S", (-1528, 240, 20), 2, (-1528, 240, 150));
	maps\mp\_fx::loopfx("thin_black_smoke_M", (-952, 656, 224), 1, (-952, 656, 550));
	maps\mp\_fx::loopfx("thin_black_smoke_M", (-976, -112, 384), 1, (-976, -112, 650));
	maps\mp\_fx::loopfx("thin_black_smoke_M", (-2040, 688, 320), 1, (-2040, 688, 600));
	maps\mp\_fx::loopfx("thin_black_smoke_M", (-1176, 1480, 105), 1, (-1176, 1480, 350));
      }

	//fire
      if(level.wwx_ambfirefx)
      {
	maps\mp\_fx::loopfx("tank_fire_engine", (-1176, 1480, 105), 2, (-1176, 1480, 130));
	maps\mp\_fx::loopfx("tank_fire_engine", (-1184, 1400, 90), 2, (-1184, 1400, 105));
	maps\mp\_fx::loopfx("tank_fire_engine", (-1392, 416, 40), 2, (-1392, 416, 72));
	maps\mp\_fx::loopfx("building_fire_large", (-952, 656, 180), 2, (-952, 656, 550));
	maps\mp\_fx::loopfx("building_fire_large", (-1168, 800, 250), 2, (-1168, 800, 500));
      }

	//misc
      if(level.wwx_ambfliesfx)
      {
	maps\mp\_fx::loopfx("insects_carcass_flies", (-2096, 1960, 40), 2, (-2096, 1960, 90));
	maps\mp\_fx::loopfx("insects_carcass_flies", (-3160, 1792, 40), 2, (-3160, 1792, 90));
	maps\mp\_fx::loopfx("insects_carcass_flies", (-2824, 824, 40), 2, (-2824, 824, 90));
	maps\mp\_fx::loopfx("insects_carcass_flies", (-2512, -440, 40), 2, (-2512, -440, 90));
	maps\mp\_fx::loopfx("insects_carcass_flies", (-736, -664, 40), 2, (-736, -664, 90));
	maps\mp\_fx::loopfx("insects_carcass_flies", (488, 1488, 40), 2, (488, 1488, 90));
	maps\mp\_fx::loopfx("insects_carcass_flies", (-1480, 2352, 40), 2, (-1480, 2352, 90));
      }
}