// IW6 GSC SOURCE
// Generated by https://github.com/xensik/gsc-tool

main()
{
    level._effect["vfx_garage_smk_gust_light"] = loadfx( "vfx/moments/homecoming/vfx_garage_smk_gust_light" );
    level._effect["vfx_sunflare_desert"] = loadfx( "vfx/ambient/atmospheric/vfx_sunflare_desert" );
    level._effect["vfx_window_smash_hc"] = loadfx( "vfx/moments/homecoming/vfx_window_smash_hc" );
    level._effect["vfx_hc_fire_wall_far"] = loadfx( "vfx/moments/homecoming/vfx_hc_fire_wall_far" );
    level._effect["vfx_hc_fire_window"] = loadfx( "vfx/moments/homecoming/vfx_hc_fire_window" );
    level._effect["dlight_glow_medium_green_cockpit"] = loadfx( "vfx/moments/homecoming/dlight_glow_medium_green_cockpit" );
    level._effect["smoky_fluorescent_light_fit"] = loadfx( "vfx/moments/homecoming/smoky_fluorescent_light_fit" );
    level._effect["fluorescent_light_fit_flicker"] = loadfx( "vfx/moments/homecoming/fluorescent_light_fit_flicker" );
    level._effect["vfx_particulates_fluorescent_lit"] = loadfx( "vfx/moments/homecoming/vfx_particulates_fluorescent_lit" );
    level._effect["small_fluorescent_light_fit_green"] = loadfx( "vfx/moments/homecoming/small_fluorescent_light_fit_green" );
    level._effect["fluorescent_light_fit"] = loadfx( "vfx/moments/homecoming/fluorescent_light_fit" );
    level._effect["vfx_ceiling_cracks"] = loadfx( "vfx/moments/homecoming/vfx_ceiling_cracks" );
    level._effect["vfx_sparkdrip_runner_nolod"] = loadfx( "vfx/moments/homecoming/vfx_sparkdrip_runner_nolod" );
    level._effect["vfx_hc_fire_wall_nolod"] = loadfx( "vfx/moments/homecoming/vfx_hc_fire_wall_nolod" );
    level._effect["vfx_hc_fire_wall_nolod"] = loadfx( "vfx/moments/homecoming/vfx_hc_fire_wall_nolod" );
    level._effect["vfx_sparkdrip_runner_nolod"] = loadfx( "vfx/moments/homecoming/vfx_sparkdrip_runner_nolod" );
    level._effect["vfx_flak_blast_moving"] = loadfx( "vfx/moments/homecoming/vfx_flak_blast_moving" );
    level._effect["warm_light_30_rect_flicker"] = loadfx( "vfx/moments/homecoming/warm_light_30_rect_flicker" );
    level._effect["warm_light_30_rect_nolight"] = loadfx( "vfx/moments/homecoming/warm_light_30_rect_nolight" );
    level._effect["heli_pipe_snap_2x"] = loadfx( "vfx/moments/homecoming/heli_pipe_snap_2x" );
    level._effect["vfx_glow_red_light_200_blinker"] = loadfx( "vfx/moments/homecoming/vfx_glow_red_light_200_blinker" );
    level._effect["vfx_antiair_flak_runner"] = loadfx( "vfx/moments/homecoming/vfx_antiair_flak_runner" );
    level._effect["vfx_mp_electrical_sparks"] = loadfx( "vfx/moments/homecoming/vfx_mp_electrical_sparks" );
    level._effect["vfx_green_blinking_light_sm"] = loadfx( "vfx/ambient/lights/vfx_green_blinking_light_sm" );
    level._effect["vfx_glow_green_light_15_nolight"] = loadfx( "vfx/ambient/lights/vfx_glow_green_light_15_nolight" );
    level._effect["vfx_glow_red_light_30_blinker_nolight"] = loadfx( "vfx/ambient/lights/vfx_glow_red_light_30_blinker_nolight" );
    level._effect["vfx_glow_red_light_5_blinker_dlight"] = loadfx( "vfx/ambient/lights/vfx_glow_red_light_5_blinker_dlight" );
    level._effect["cloud_tunnel"] = loadfx( "fx/maps/homecoming/cloud_tunnel" );
    level._effect["window_volumetric_long"] = loadfx( "fx/maps/homecoming/window_volumetric_long" );
    level._effect["vfx_garage_smk_start"] = loadfx( "vfx/moments/homecoming/vfx_garage_smk_start" );
    level._effect["vfx_structure_collapse"] = loadfx( "vfx/moments/homecoming/vfx_structure_collapse" );
    level._effect["vfx_garage_smk_gust_sm"] = loadfx( "vfx/moments/homecoming/vfx_garage_smk_gust_sm" );
    level._effect["vfx_garage_smk_gust"] = loadfx( "vfx/moments/homecoming/vfx_garage_smk_gust" );
    level._effect["vfx_balcony_collapse_dust"] = loadfx( "vfx/moments/homecoming/vfx_balcony_collapse_dust" );
    level._effect["vfx_hc_fire_wall_cheap"] = loadfx( "vfx/moments/homecoming/vfx_hc_fire_wall_cheap" );
    level._effect["vfx_light_glow"] = loadfx( "vfx/moments/homecoming/vfx_light_glow" );
    level._effect["vfx_bugs"] = loadfx( "vfx/moments/homecoming/vfx_bugs" );
    level._effect["vfx_fire_mini"] = loadfx( "vfx/moments/homecoming/vfx_fire_mini" );
    level._effect["vfx_tower_explosion_dust"] = loadfx( "vfx/moments/homecoming/vfx_tower_explosion_dust" );
    level._effect["vfx_balcony_bust"] = loadfx( "vfx/moments/homecoming/vfx_balcony_bust" );
    level._effect["vfx_tower_glass_break"] = loadfx( "vfx/moments/homecoming/vfx_tower_glass_break" );
    level._effect["vfx_exp_airport_tower"] = loadfx( "vfx/moments/homecoming/vfx_exp_airport_tower" );
    level._effect["vfx_airport_exp_fallout"] = loadfx( "vfx/moments/homecoming/vfx_airport_exp_fallout" );
    level._effect["vfx_fire_lrg_airport_tower"] = loadfx( "vfx/moments/homecoming/vfx_fire_lrg_airport_tower" );
    level._effect["vfx_ceiling_breach"] = loadfx( "vfx/moments/homecoming/vfx_ceiling_breach" );
    level._effect["vfx_wall_breach"] = loadfx( "vfx/moments/homecoming/vfx_wall_breach" );
    level._effect["vfx_floor_fire"] = loadfx( "vfx/moments/homecoming/vfx_floor_fire" );
    level._effect["vfx_hovercraft_drip"] = loadfx( "vfx/moments/homecoming/vfx_hovercraft_drip" );
    level._effect["vfx_hovercraft_dust_fall"] = loadfx( "vfx/moments/homecoming/vfx_hovercraft_dust_fall" );
    level._effect["vfx_exp_mortar_lg"] = loadfx( "vfx/moments/homecoming/vfx_exp_mortar_lg" );
    level._effect["vfx_exp_mortar_sm"] = loadfx( "vfx/moments/homecoming/vfx_exp_mortar_sm" );
    level._effect["vfx_fire_falling_runner_hc"] = loadfx( "vfx/moments/homecoming/vfx_fire_falling_runner_hc" );
    level._effect["vfx_burnt_room_embers"] = loadfx( "vfx/moments/homecoming/vfx_burnt_room_embers" );
    level._effect["vfx_sparkdrip_runner"] = loadfx( "vfx/moments/homecoming/vfx_sparkdrip_runner" );
    level._effect["debris_smolder_large"] = loadfx( "vfx/ambient/fire/debris_smolder_large" );
    level._effect["vfx_fire_wall_medium"] = loadfx( "vfx/ambient/fire/wall/vfx_fire_wall_medium" );
    level._effect["vfx_fire_server_sov"] = loadfx( "vfx/ambient/fire/electrical/vfx_fire_server_sov" );
    level._effect["vfx_fireplace"] = loadfx( "vfx/ambient/fire/vfx_fireplace" );
    level._effect["vfx_sprinkler_system"] = loadfx( "vfx/moments/homecoming/vfx_sprinkler_system" );
    level._effect["vfx_spklr_impact_home"] = loadfx( "vfx/moments/homecoming/vfx_spklr_impact_home" );
    level._effect["vfx_hovercraft_wash"] = loadfx( "vfx/moments/homecoming/vfx_hovercraft_wash" );
    level._effect["vfx_trench_blast"] = loadfx( "vfx/moments/homecoming/vfx_trench_blast" );
    level._effect["vfx_ceiling_smoke"] = loadfx( "vfx/moments/homecoming/vfx_ceiling_smoke" );
    level._effect["vfx_wall_smoke"] = loadfx( "vfx/moments/homecoming/vfx_wall_smoke" );
    level._effect["vfx_antiair_tracer_flak_runner"] = loadfx( "vfx/moments/homecoming/vfx_antiair_tracer_flak_runner" );
    level._effect["vfx_flak_blast"] = loadfx( "vfx/moments/homecoming/vfx_flak_blast" );
    level._effect["vfx_exp_hovercraft_missle"] = loadfx( "vfx/moments/homecoming/vfx_exp_hovercraft_missle" );
    level._effect["vfx_hesco_dust_blast"] = loadfx( "vfx/moments/homecoming/vfx_hesco_dust_blast" );
    level._effect["vfx_lens_flare_homec"] = loadfx( "vfx/moments/homecoming/vfx_lens_flare_homec" );
    level._effect["vfx_hesco_explosion"] = loadfx( "vfx/moments/homecoming/vfx_hesco_explosion" );
    level._effect["vfx_hoverc_smoke_gren"] = loadfx( "vfx/moments/homecoming/vfx_hoverc_smoke_gren" );
    level._effect["vfx_battlefield_ground_smk_bright"] = loadfx( "vfx/moments/homecoming/vfx_battlefield_ground_smk_bright" );
    level._effect["vfx_homec_fire_wall_lrg"] = loadfx( "vfx/moments/homecoming/vfx_homec_fire_wall_lrg" );
    level._effect["vfx_homec_fire_wall_small"] = loadfx( "vfx/moments/homecoming/vfx_homec_fire_wall_small" );
    level._effect["vfx_hallway_explosion"] = loadfx( "vfx/moments/homecoming/vfx_hallway_explosion" );
    level._effect["vfx_lens_flare_home"] = loadfx( "vfx/moments/homecoming/vfx_lens_flare_home" );
    level._effect["vfx_hesco_large_fire"] = loadfx( "vfx/moments/homecoming/vfx_hesco_large_fire" );
    level._effect["vfx_hesco_building_fire"] = loadfx( "vfx/moments/homecoming/vfx_hesco_building_fire" );
    level._effect["vfx_signal_smoke_red"] = loadfx( "vfx/moments/homecoming/vfx_signal_smoke_red" );
    level._effect["vfx_exp_mortar"] = loadfx( "vfx/moments/homecoming/vfx_exp_mortar" );
    level._effect["vfx_lightning_cloud_runner"] = loadfx( "vfx/moments/homecoming/vfx_lightning_cloud_runner" );
    level._effect["vfx_room_dust_sha"] = loadfx( "vfx/moments/homecoming/vfx_room_dust_sha" );
    level._effect["vfx_crater_smold"] = loadfx( "vfx/moments/homecoming/vfx_crater_smold" );
    level._effect["vfx_battlefield_ground_smk"] = loadfx( "vfx/moments/homecoming/vfx_battlefield_ground_smk" );
    level._effect["vfx_debris_fire_tiny"] = loadfx( "vfx/moments/mp_chasm/vfx_debris_fire_tiny" );
    level._effect["vfx_debris_fire_sm"] = loadfx( "vfx/moments/mp_chasm/vfx_debris_fire_sm" );
    level._effect["vfx_ground_fire"] = loadfx( "vfx/moments/homecoming/vfx_ground_fire" );
    level._effect["vfx_thin_dust_fall_runner"] = loadfx( "vfx/moments/homecoming/vfx_thin_dust_fall_runner" );
    level._effect["vfx_battle_fallout_nodense"] = loadfx( "vfx/moments/homecoming/vfx_battle_fallout_nodense" );
    level._effect["vfx_battle_field_sm"] = loadfx( "vfx/moments/homecoming/vfx_battle_field_sm" );
    level._effect["vfx_hc_ocean_waves_blowoff"] = loadfx( "vfx/ambient/water/vfx_hc_ocean_waves_blowoff" );
    level._effect["vfx_hc_ocean_waves_splash"] = loadfx( "vfx/ambient/water/vfx_hc_ocean_waves_splash" );
    level._effect["smk_plume_black_xsml_hc"] = loadfx( "vfx/ambient/smoke/smk_plume_black_xsml_hc" );
    level._effect["vfx_sparks_lights_hc"] = loadfx( "vfx/ambient/sparks/vfx_sparks_lights_hc" );
    level._effect["vfx_smk_building_damage"] = loadfx( "vfx/ambient/smoke/vfx_smk_building_damage" );
    level._effect["vfx_smk_vista_hc"] = loadfx( "vfx/ambient/smoke/vfx_smk_vista_hc" );
    level._effect["vfx_smoking_gun"] = loadfx( "vfx/moments/homecoming/vfx_smoking_gun" );
    level._effect["vfx_wall_smoke_fire"] = loadfx( "vfx/moments/homecoming/vfx_wall_smoke_fire" );
    level._effect["vfx_homec_fire_wall_lrg_cheap"] = loadfx( "vfx/moments/homecoming/vfx_homec_fire_wall_lrg_cheap" );
    precachefx();
    mortarfx();
    treadfx();

    if ( !getdvarint( "r_reflectionProbeGenerate" ) )
    {
        maps\createfx\homecoming_fx::main();
        maps\createfx\homecoming_sound::main();
    }
}

precachefx()
{
    recruits_fx_precache();
    level._effect["body_impact1"] = loadfx( "vfx/gameplay/impacts/flesh/vfx_flesh_hit_body_fatal" );
    level._effect["body_impact2"] = loadfx( "vfx/gameplay/impacts/flesh/vfx_flesh_hit_body_fatal" );
    level._effect["headshot_blood"] = loadfx( "vfx/gameplay/impacts/flesh/vfx_flesh_hit_head_fatal" );
    level._effect["blood_pool"] = loadfx( "fx/impacts/deathfx_bloodpool_generic" );
    level._effect["foliage_dub_potted_spikey_plant"] = loadfx( "fx/props/foliage_dub_potted_spikey_plant" );
    level._effect["player_embers"] = loadfx( "vfx/moments/homecoming/vfx_onplayer_embers" );
    level._effect["drone_tracer"] = loadfx( "fx/_requests/homecoming/drone_tracer" );
    level._effect["mg_tracer"] = loadfx( "fx/_requests/homecoming/mg_tracer" );
    level._effect["chaingun_shellEject"] = loadfx( "fx/_requests/homecoming/chaingun_shelleject" );
    level._effect["artemis_muzzleflash"] = loadfx( "fx/muzzleflashes/bmp_flash_wv" );
    level._effect["artemis_tracer"] = loadfx( "fx/misc/f15_20mm_tracer_close_ac130" );
    level._effect["dragons_teeth_concrete_fx"] = loadfx( "fx/breakables/toy_concrete_barrier_01" );
    level._effect["destructible_sandbags_fx"] = loadfx( "fx/_requests/homecoming/destructible_sandbags_explosion" );
    level._effect["hind_damage_explosion"] = loadfx( "fx/explosions/grenadeexp_default" );
    level._effect["hind_damage_trail"] = loadfx( "fx/fire/fire_smoke_trail_L" );
    level._effect["helicopter_explosion_hind_chernobyl"] = loadfx( "fx/explosions/helicopter_explosion_hind_chernobyl" );
    level._effect["grenadeexp_default"] = loadfx( "fx/explosions/grenadeexp_default" );
    level._effect["fire_smoke_trail_L"] = loadfx( "fx/fire/fire_smoke_trail_L" );
    level._effect["nh90_damage_explosion"] = loadfx( "fx/explosions/clusterbomb_exp_small_no_fount" );
    level._effect["nh90_damage_trail"] = loadfx( "fx/smoke/smoke_trail_black_heli" );
    level._effect["osprey_engine_explosion"] = loadfx( "fx/explosions/heli_engine_osprey_explosion" );
    level._effect["welding_sparks"] = loadfx( "fx/misc/factory_welding_runner" );
    level._effect["smoke_red_trail"] = loadfx( "fx/_requests/homecoming/signal_smoke_red_trail" );
    level._effect["red_signal_smoke"] = loadfx( "vfx/moments/homecoming/vfx_signal_smoke_red" );
    level._effect["mg_sparks"] = loadfx( "fx/explosions/powerlines_a" );
    level._effect["phalanx_tracer"] = loadfx( "fx/misc/f15_20mm_tracer_close_ac130" );
    level._effect["phalanx_missile_explosion"] = loadfx( "fx/explosions/aerial_explosion" );
    level._effect["tank_flash"] = loadfx( "fx/muzzleflashes/abrams_flash_wv" );
    level._effect["heli_missile_explosion"] = loadfx( "fx/explosions/clusterbomb_exp_small_no_fount" );
    level._effect["m880_death_fx"] = loadfx( "vfx/gameplay/explosions/vfx_exp_t90ms_end" );
    level._effect["chopper_minigun_tracer"] = loadfx( "fx/_requests/homecoming/mg_tracer" );
    level._effect["chopper_flare"] = loadfx( "fx/_requests/apache/apache_flare_ai" );
    level._effect["chopper_flare_explosion"] = loadfx( "fx/_requests/apache/apache_trophy_explosion_ai" );
    level._effect["falling_debris_large"] = loadfx( "fx/misc/falling_debris_large" );
    level._effect["ceiling_debris_1"] = loadfx( "fx/dust/ceiling_dust_default" );
    level._effect["ceiling_debris_2"] = loadfx( "fx/explosions/ceiling_concrete_small" );
    level._effect["artillery_explosion"] = loadfx( "fx/explosions/mosque_impact_dirt" );
    level._effect["artillery_explosion_player"] = loadfx( "fx/_requests/homecoming/artillery_explosion" );
    level._effect["artillery_explosion_metal_tower"] = loadfx( "fx/_requests/homecoming/artillery_explosion_metal_tower" );
    level._effect["artillery_raining_dirt"] = loadfx( "fx/_requests/homecoming/artillery_raining_dirt" );
    level._effect["artillery_hesco_tower_explosion"] = loadfx( "fx/explosions/building_missilehit" );
    level._effect["artillery_sand_explosion"] = loadfx( "fx/explosions/tank_impact_sand" );
    level._effect["hovercraft_smoke"] = loadfx( "vfx/moments/homecoming/vfx_hoverc_smoke_gren" );
    level._effect["hovercraft_missile_trail"] = loadfx( "fx/smoke/smoke_geotrail_javelin" );
    level._effect["balcony_impact_sand_1"] = loadfx( "vfx/gameplay/impacts/shot/vfx_imp_shot_sand" );
    level._effect["balcony_impact_sand_2"] = loadfx( "vfx/gameplay/impacts/vfx_sand_impact" );
    level._effect["a10_damaged_smoke"] = loadfx( "fx/_requests/homecoming/a10_damaged_smoke" );
    level._effect["airplane_smoke_trail"] = loadfx( "fx/smoke/smoke_trail_black_heli" );
    level._effect["a10_explosion"] = loadfx( "fx/explosions/a10_explosion" );
    level._effect["a10_30mm_smoke"] = loadfx( "fx/smoke/smoke_trail_white_heli" );
    level._effect["a10_aerial_explosion"] = loadfx( "fx/explosions/vehicle_explosion_slamraam_no_missiles" );
    level._effect["hovercraft_side_sand"] = loadfx( "fx/treadfx/tread_sand_satfarm" );
    level._effect["aerial_explosion_mig29"] = loadfx( "fx/explosions/aerial_explosion_mig29" );
    level._effect["mig_ignite"] = loadfx( "fx/fire/jet_afterburner_ignite" );
    level._effect["tower_missile_trails"] = loadfx( "fx/smoke/smoke_geotrail_javelin" );
    level._effect["sprinkler_screeneffect"] = loadfx( "vfx/gameplay/screen_effects/vfx_scrnfx_tocam_waterdrops_xs" );
    level._effect["mortar_sm"] = loadfx( "vfx/moments/homecoming/vfx_exp_mortar_sm" );
    level._effect["extinguisher_spray"] = loadfx( "vfx/moments/homecoming/vfx_fire_extinguisher_spray" );
    level._effect["beam_fire"] = loadfx( "vfx/moments/homecoming/vfx_fire_mini_script" );
    level._effect["player_stabbed"] = loadfx( "vfx/moments/homecoming/vfx_stab_blood" );
    level._effect["enemy_mask_breath"] = loadfx( "fx/misc/cold_breath_cheap" );
    level._effect["end_ceiling_charge"] = loadfx( "vfx/moments/homecoming/vfx_ceiling_cracks" );
}

mortarfx()
{
    level._effect["mortar"]["sand"] = loadfx( "vfx/moments/homecoming/vfx_exp_mortar" );
    level._effect["mortar"]["sand_sm"] = loadfx( "vfx/moments/homecoming/vfx_exp_mortar_sm" );
    level._effect["mortar"]["concrete"] = loadfx( "vfx/moments/homecoming/vfx_exp_mortar_sm" );
    level._effect["mortar"]["water"] = loadfx( "fx/_requests/oilrocks/vfx_apache_missile_water_impact" );
    level.scr_sound["mortar"]["incomming"] = "mortar_incoming";
    level.scr_sound["mortar"]["dirt"] = "mortar_explosion_big_dirt";
    level.scr_sound["mortar"]["sand"] = "mortar_explosion_big_dirt";
    level.scr_sound["mortar"]["sand_sm"] = "mortar_explosion_dirt";
    level.scr_sound["mortar"]["concrete"] = "mortar_explosion_dirt";
    level.scr_sound["mortar"]["mud"] = "mortar_explosion_big_dirt";
    level.scr_sound["mortar"]["water"] = "mortar_explosion_water";
}

treadfx()
{
    var_0 = "vfx/gameplay/tread_fx/vfx_heli_dust_sand";
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "brick", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "bark", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "carpet", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "cloth", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "concrete", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "dirt", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "flesh", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "foliage", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "glass", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "grass", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "gravel", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "ice", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "metal", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "mud", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "paper", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "plaster", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "rock", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "sand", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "snow", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "water", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "wood", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "asphalt", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "ceramic", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "plastic", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "rubber", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "cushion", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "fruit", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "painted metal", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "default", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_nh90", "none", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "brick", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "bark", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "carpet", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "cloth", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "concrete", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "dirt", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "flesh", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "foliage", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "glass", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "grass", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "gravel", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "ice", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "metal", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "mud", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "paper", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "plaster", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "rock", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "sand", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "snow", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "water", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "wood", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "asphalt", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "ceramic", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "plastic", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "rubber", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "cushion", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "fruit", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "painted metal", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "default", var_0 );
    maps\_treadfx::setvehiclefx( "script_vehicle_hind_battle", "none", var_0 );
}

recruits_fx_precache()
{
    level._effect["smk_plume_black_xsml_hc_recruits"] = loadfx( "vfx/ambient/smoke/smk_plume_black_xsml_hc_recruits" );
    level._effect["vfx_periph_smk_war_vista"] = loadfx( "vfx/ambient/skybox/vfx_perif_smk_war_vista" );
    level._effect["window_volumetric"] = loadfx( "fx/maps/hijack/window_volumetric" );
    level._effect["window_volumetric_long"] = loadfx( "fx/maps/hijack/window_volumetric_long" );
    level._effect["window_volumetric_open"] = loadfx( "fx/maps/hijack/window_volumetric_open" );
    level._effect["vfx_antiair_tracer_flak_short"] = loadfx( "vfx/moments/homecoming/vfx_antiair_tracer_flak_short" );
    level._effect["vfx_antiair_tracer_flak"] = loadfx( "vfx/moments/homecoming/vfx_antiair_tracer_flak" );
    level._effect["antiair_flak_runner"] = loadfx( "vfx/moments/homecoming/vfx_antiair_flak_runner" );
    level._effect["antiair_tracer_flak_runner"] = loadfx( "vfx/moments/homecoming/vfx_antiair_tracer_flak_runner" );
    level._effect["flak_blast_moving"] = loadfx( "vfx/moments/homecoming/vfx_flak_blast_moving" );
    level._effect["glow_green_light_15_nolight"] = loadfx( "vfx/ambient/lights/vfx_glow_green_light_15_nolight" );
    level._effect["mp_electrical_sparks"] = loadfx( "vfx/moments/homecoming/vfx_mp_electrical_sparks" );
    level._effect["recruit_flak_moving_smk_lite"] = loadfx( "vfx/moments/homecoming/vfx_recruit_flak_moving_smk_lite" );
    level._effect["recruit_passing_cloud"] = loadfx( "vfx/moments/homecoming/vfx_recruit_passing_cloud" );
    level._effect["warm_light_30_rect_flicker"] = loadfx( "vfx/moments/homecoming/warm_light_30_rect_flicker" );
    level._effect["warm_light_30_rect_nolight"] = loadfx( "vfx/moments/homecoming/warm_light_30_rect_nolight" );
}

homecoming_recruits_fx()
{
    setup_volumetric_light_anims();
    thread setup_volumetric_lights();
    thread lgt_init();
}

lgt_init()
{
    common_scripts\utility::flag_init( "lgt_random_intensity_stop" );
    var_0 = getent( "chopper_sun", "script_noteworthy" );

    if ( isdefined( var_0 ) )
    {
        if ( maps\_utility::is_gen4() )
            var_0 lgt_sun_intensity_ng();
        else
            var_0 lgt_sun_intensity_cg();
    }
}

lgt_sun_intensity_ng()
{
    self setlightintensity( 2.0 );
    self setlightcolor( ( 0.792, 0.6, 0.529 ) );
    thread changelightintensityrandom( 2.0, 0.35, 0.5, 0.1, 0.9 );
    wait 8;
    thread easychangelightcolorovertime( ( 0.964, 0.603, 0.364 ), 10 );
    wait 4;
    common_scripts\utility::flag_set( "lgt_random_intensity_stop" );
    changelightintensityovertimerandom( 4.0, 15, 0.35, 0.45 );
    common_scripts\utility::flag_clear( "lgt_random_intensity_stop" );
    thread changelightintensityrandom( 4.0, 0.3, 0.4, 0.3, 0.9 );
    wait 5;
    common_scripts\utility::flag_set( "lgt_random_intensity_stop" );
    wait 3;
    common_scripts\utility::flag_clear( "lgt_random_intensity_stop" );
    thread changelightintensityrandom( 4.0, 0.3, 0.4, 0.3, 2.5 );
}

lgt_sun_intensity_cg()
{
    self setlightintensity( 1.5 );
    self setlightcolor( ( 0.792, 0.6, 0.529 ) );
    thread changelightintensityrandom( 1.5, 0.3, 0.4, 0.1, 0.9 );
    wait 8;
    thread easychangelightcolorovertime( ( 0.964, 0.603, 0.364 ), 10 );
    wait 4;
    common_scripts\utility::flag_set( "lgt_random_intensity_stop" );
    changelightintensityovertimerandom( 2.0, 15, 0.25, 0.35 );
    common_scripts\utility::flag_clear( "lgt_random_intensity_stop" );
    thread changelightintensityrandom( 2.0, 0.2, 0.3, 0.3, 0.9 );
    wait 5;
    common_scripts\utility::flag_set( "lgt_random_intensity_stop" );
    wait 3;
    common_scripts\utility::flag_clear( "lgt_random_intensity_stop" );
    thread changelightintensityrandom( 2.0, 0.2, 0.3, 0.3, 2.5 );
}

changelightintensityovertime( var_0, var_1 )
{
    var_2 = self getlightintensity();
    var_3 = int( var_1 / 0.05 );
    var_4 = ( var_0 - var_2 ) / var_3;
    var_5 = var_2;

    for ( var_6 = 0; var_6 < var_3; var_6++ )
    {
        var_5 = var_5 + var_4;
        self setlightintensity( var_5 );
        wait 0.05;
    }

    self setlightintensity( var_0 );
}

changelightintensityovertimerandom( var_0, var_1, var_2, var_3 )
{
    level.curintensity = self getlightintensity();
    thread changelightintensityovertimerandom_tick( var_0, var_1 );
    var_4 = 0;
    var_5 = 0;

    while ( level.curintensity != var_0 )
    {
        if ( var_5 )
        {
            wait( randomfloatrange( 0.1, 0.5 ) );
            var_5 = 0;
            var_6 = randomfloatrange( 0.1, 0.5 );
            changelightintensityovertime( level.curintensity, var_6 );
            continue;
        }

        wait( randomfloatrange( 0.2, 0.5 ) );
        var_5 = 1;
        var_6 = randomfloatrange( 0.1, 0.5 );
        changelightintensityovertime( level.curintensity - level.curintensity * randomfloatrange( var_2, var_3 ), var_6 );
    }

    self setlightintensity( var_0 );
}

changelightintensityovertimerandom_tick( var_0, var_1 )
{
    var_2 = level.curintensity;
    var_3 = int( var_1 / 0.05 );
    var_4 = ( var_0 - var_2 ) / var_3;

    for ( var_5 = 0; var_5 < var_3; var_5++ )
    {
        level.curintensity = level.curintensity + var_4;
        wait 0.05;
    }

    level.curintensity = var_0;
}

changelightintensityrandom( var_0, var_1, var_2, var_3, var_4 )
{
    self endon( "lgt_random_intensity_stop" );
    var_5 = 0;

    while ( !common_scripts\utility::flag( "lgt_random_intensity_stop" ) )
    {
        if ( var_5 )
        {
            wait( randomfloatrange( 0.1, 0.6 ) );
            var_5 = 0;
            var_6 = randomfloatrange( 0.1, 0.6 );
            changelightintensityovertime( var_0, var_6 );
            continue;
        }

        wait( randomfloatrange( var_3, var_4 ) );
        var_5 = 1;
        var_6 = randomfloatrange( 0.1, 0.6 );
        changelightintensityovertime( var_0 - var_0 * randomfloatrange( var_1, var_2 ), var_6 );
    }
}

easychangelightcolorovertime( var_0, var_1 )
{
    var_2 = self getlightcolor();
    var_3 = int( var_1 / 0.05 );

    for ( var_4 = 0; var_4 < var_3; var_4++ )
    {
        self setlightcolor( vectorlerp( var_2, var_0, ( var_4 + 1.0 ) / var_3 ) );
        wait 0.05;
    }

    self setlightcolor( var_0 );
}

#using_animtree("script_model");

setup_volumetric_light_anims()
{
    level.scr_animtree["recruits_sunlight"] = #animtree;
    level.scr_model["recruits_sunlight"] = "tag_origin_animate";
    level.scr_anim["recruits_sunlight"]["hc_recruit_lightmotion"] = %hc_recruit_lightmotion;
}

setup_volumetric_lights()
{
    wait 0.5;
    level.volumetric_window_fx = [];
    level.volumetric_window_fx_ents = [];
    level.recruits_godrays = getentarray( "recruits_god_ray_emitter", "targetname" );
    level.recruits_anim_light = getent( "chopper_sun", "targetname" );

    if ( isdefined( level.recruits_anim_light ) )
        level.recruits_anim_light_source_pos = level.recruits_anim_light.origin;

    level.recruits_anim_light_struct = common_scripts\utility::getstruct( "recruit_anim_node_l", "script_noteworthy" );
    level.recruits_anim_light_smodel = spawn( "script_model", level.recruits_anim_light_struct.origin );
    level.recruits_anim_light_smodel setmodel( "tag_origin_animate" );
    level.recruits_anim_light_smodel.animname = "recruits_sunlight";
    level.recruits_anim_light_smodel maps\_utility::assign_animtree();
    var_0 = [];
    var_0["hc_recruit_lightmotion"] = level.recruits_anim_light_smodel;

    foreach ( var_2 in level.recruits_godrays )
    {
        var_3 = common_scripts\utility::spawn_tag_origin();
        var_3.origin = var_2.origin;
        var_3.angles = var_2.angles;
        playfxontag( common_scripts\utility::getfx( "window_volumetric_open" ), var_3, "tag_origin" );
        var_4 = common_scripts\utility::spawn_tag_origin();
        var_4.origin = var_3.origin;
        var_3 linkto( var_4 );
        level.volumetric_window_fx_ents[level.volumetric_window_fx_ents.size] = var_3;
        level.volumetric_window_fx[level.volumetric_window_fx.size] = var_4;
    }

    level.recruits_anim_light_struct thread maps\_anim::anim_single( var_0, "hc_recruit_lightmotion" );

    for (;;)
    {
        foreach ( var_2 in level.recruits_godrays )
            var_2 rotateto( level.recruits_anim_light_smodel.angles, 0.1 );

        if ( isdefined( level.recruits_anim_light ) )
        {

        }

        common_scripts\utility::waitframe();
    }
}

fx_recruit_ambient()
{
    common_scripts\utility::flag_init( "fx_stop_flak" );
    common_scripts\utility::flag_init( "fx_stop_flak_blast" );
    thread fx_recruit_flak_blast();
    thread fx_recruit_flak_blast_audio();
    common_scripts\utility::exploder( "recruit_ambient" );
    wait 2;
    common_scripts\utility::exploder( "recruit_flak_ahead" );
    common_scripts\utility::exploder( "recruit_flak_side_near" );
    common_scripts\utility::exploder( "recruit_flak_side_far" );
    common_scripts\utility::exploder( "recruit_tracer_low" );
    common_scripts\utility::exploder( "recruit_tracer_med" );
    common_scripts\utility::exploder( "recruit_tracer_high" );
    wait 1;
    thread fx_recruit_smoke_window();
    wait 17;
    common_scripts\utility::flag_set( "fx_stop_flak_blast" );
    maps\_utility::stop_exploder( "recruit_tracer_med" );
    wait 14;
    common_scripts\utility::flag_set( "fx_stop_flak" );
    maps\_utility::stop_exploder( "recruit_flak_ahead" );
    maps\_utility::stop_exploder( "recruit_flak_side_near" );
    maps\_utility::stop_exploder( "recruit_flak_side_near" );
    maps\_utility::stop_exploder( "recruit_tracer_low" );
    wait 20;
    maps\_utility::stop_exploder( "recruit_flak_side_far" );
    maps\_utility::stop_exploder( "recruit_tracer_high" );
}

fx_recruit_flak_blast()
{
    wait( randomfloatrange( 7.0, 9.0 ) );

    while ( !common_scripts\utility::flag( "fx_stop_flak_blast" ) )
    {
        common_scripts\utility::exploder( "recruit_flak_blast" );
        earthquake( 0.2, 2.0, level.player.origin, 1600 );
        wait( randomfloatrange( 4.0, 8.0 ) );
    }
}

fx_recruit_flak_blast_audio()
{
    wait 1.15;
    common_scripts\utility::exploder( "recruit_flak_blast_audio" );
    wait 4.09;
    common_scripts\utility::exploder( "recruit_flak_blast_audio" );
    wait 27.33;
    common_scripts\utility::exploder( "recruit_flak_blast_audio" );
}

fx_recruit_smoke_window()
{
    while ( !common_scripts\utility::flag( "fx_stop_flak_blast" ) )
    {
        common_scripts\utility::exploder( "recruit_smoke_window" );
        wait( randomfloatrange( 1.0, 4.0 ) );
    }

    while ( !common_scripts\utility::flag( "fx_stop_flak" ) )
    {
        common_scripts\utility::exploder( "recruit_smoke_window" );

        if ( randomint( 2 ) == 1 )
            common_scripts\utility::exploder( "recruit_cloud_side" );

        wait( randomfloatrange( 1.0, 2.5 ) );
    }

    for (;;)
    {
        if ( randomint( 3 ) > 0 )
            common_scripts\utility::exploder( "recruit_cloud_ahead" );

        common_scripts\utility::exploder( "recruit_cloud_side" );
        wait( randomfloatrange( 1.0, 2.5 ) );
    }
}
