main()
{
	precacheFX();
	ambientFX();
}




precacheFX()
{
	if(level.wwx_ambfirefx){
	level._effect["building_fire_large"] = loadfx ("fx/fire/building_fire_large.efx");
	level._effect["building_fire_small"] = loadfx ("fx/fire/building_fire_small.efx");
	}
	
	if(level.wwx_ambfogbankfx){
	level._effect["thin_black_smoke_M"] = loadfx ("fx/smoke/thin_black_smoke_M.efx");
	level._effect["tanksmoke"] = loadfx("fx/smoke/thin_black_smoke_S.efx");
	level._effect["cratersmoke"] = loadfx ("fx/smoke/thin_light_smoke_M.efx");  
	}
}





ambientFX()
{
	if(level.wwx_ambfirefx){
		maps\mp\_fx::loopfx("building_fire_large", (-215, -950, -1021), 1, (-115, -1050, -600));
		maps\mp\_fx::loopfx("building_fire_large", (-177, -1080, -1021), 1, (-77, -1180, -600));
		maps\mp\_fx::soundfx("medfire", (-110,-1032,-900));
	
		maps\mp\_fx::loopfx("building_fire_large", (600, -200, -700), 1, (650, -300, -620));
		maps\mp\_fx::soundfx("medfire", (625, -250, -600));
	
		maps\mp\_fx::loopfx("building_fire_large", (1428, -525, -864), 1, (1528, -614, -708));
		maps\mp\_fx::loopfx("building_fire_large", (1550, -525, -864), 1, (1662, -614, -708));
		maps\mp\_fx::soundfx("medfire", (1490, -525, -700));
	
	
		maps\mp\_fx::loopfx("building_fire_large", (380, -3700, -1061), 1, (480, -3800, -961));
	}
	
	if(level.wwx_ambfogbankfx){
		maps\mp\_fx::loopfx("thin_black_smoke_M", (-1085,-5340,-824), 2, (-1085,-5340,-500));
	
		maps\mp\_fx::loopfx("cratersmoke", (-242,635,-748), 2, (3063,635,-550));
	}
}