#include clientscripts\_utility; #include clientscripts\_fx; #include clientscripts\_music; main() { precache_createfx_fx(); clientscripts\createfx\zombie_moon_fx::main(); clientscripts\_fx::reportNumEffects(); footsteps(); disableFX = GetDvarInt( #"disable_fx" ); if( !IsDefined( disableFX ) || disableFX <= 0 ) { precache_scripted_fx(); } level thread clientscripts\_zombiemode::init_perk_machines_fx(); level thread fog_triggers_setup(); level thread airlock_fx_init(); level thread breach_receiving_fx(); level thread breach_labs_lower_fx(); level thread breach_labs_upper_fx(); level thread power_on_spinning_lights(); } fog_triggers_setup() { waitforclient(0); wait(3); players = getlocalplayers(); for(i = 0;i 0 ) { array_thread( nml_array, ::fog_trigger, ::moon_nml_fog_change ); } } fog_trigger(change_func) { while(1) { self waittill("trigger", who); if(who IsLocalPlayer()) { self thread trigger_thread( who, change_func); } } } Moon_Exterior_Fog_Change(Ent_Player) { if(!isDefined(ent_player)) { return; } local_clientnum = ent_player GetLocalClientNumber(); ent_player endon("entityshutdown"); start_dist = 2098.71; half_dist = 1740.12; half_height = 1332.23; base_height = 576.887; fog_r = 0.0196078; fog_g = 0.0235294; fog_b = 0.0352941; fog_scale = 4.1367; sun_col_r = 0.247; sun_col_g = 0.235; sun_col_b = 0.160; sun_dir_x = 0.796421; sun_dir_y = 0.425854; sun_dir_z = 0.429374; sun_start_ang = 0; sun_stop_ang = 55; time = 0; max_fog_opacity = 0.95; setVolFogForClient(ent_player GetLocalClientNumber(),start_dist, half_dist, half_height, base_height, fog_r, fog_g, fog_b, fog_scale, sun_col_r, sun_col_g, sun_col_b, sun_dir_x, sun_dir_y, sun_dir_z, sun_start_ang, sun_stop_ang, time, max_fog_opacity); sunlight = 8; sundirection = (-16.28, 56.06, 0); suncolor = (0.655, 0.768, 0.817); SetSavedDvar( "r_lightTweakSunLight", sunlight ); SetSavedDvar( "r_lightTweakSunDirection", sundirection ); SetSavedDvar("sm_sunSampleSizeNear", "1.8"); SetSavedDvar( "r_skyColorTemp", (6400)); if( !IsDefined( ent_player._previous_vision ) ) { ent_player._previous_vision = "zme"; } new_vision = "zme"; ent_player clientscripts\zombie_moon_fx::moon_vision_set( ent_player._previous_vision, new_vision, local_clientnum, self.script_int ); ent_player._previous_vision = "zme"; } moon_interior_fog_change(ent_player) { if(!isDefined(ent_player)) { return; } local_clientnum = ent_player GetLocalClientNumber(); ent_player endon("entityshutdown"); start_dist = 2098.71; half_dist = 1740.12; half_height = 1332.23; base_height = 576.887; fog_r = 0.0196078; fog_g = 0.0235294; fog_b = 0.0352941; fog_scale = 4.1367; sun_col_r = 0.247; sun_col_g = 0.235; sun_col_b = 0.160; sun_dir_x = 0.796421; sun_dir_y = 0.425854; sun_dir_z = 0.429374; sun_start_ang = 0; sun_stop_ang = 55; time = 0; max_fog_opacity = 0.95; setVolFogForClient(ent_player GetLocalClientNumber(),start_dist, half_dist, half_height, base_height, fog_r, fog_g, fog_b, fog_scale, sun_col_r, sun_col_g, sun_col_b, sun_dir_x, sun_dir_y, sun_dir_z, sun_start_ang, sun_stop_ang, time, max_fog_opacity); sunlight = 8; sundirection = (-16.28, 56.06, 0); suncolor = (0.655, 0.768, 0.817); SetSavedDvar( "r_lightTweakSunLight", sunlight ); SetSavedDvar( "r_lightTweakSunDirection", sundirection ); SetSavedDvar("sm_sunSampleSizeNear", ".8"); SetSavedDvar( "r_skyColorTemp", (6400)); if( !IsDefined( ent_player._previous_vision ) ) { ent_player._previous_vision = "zmi"; } new_vision = "zmi"; ent_player clientscripts\zombie_moon_fx::moon_vision_set( ent_player._previous_vision, new_vision, local_clientnum, self.script_int ); ent_player._previous_vision = "zmi"; } moon_biodome_fog_change(ent_player) { if(!isDefined(ent_player)) { return; } local_clientnum = ent_player GetLocalClientNumber(); ent_player endon("entityshutdown"); start_dist = 65.3744; half_dist = 860.241; half_height = 35.1158; base_height = 116.637; fog_r = 0.117647; fog_g = 0.137255; fog_b = 0.101961; fog_scale = 2.96282; sun_col_r = 0.341176; sun_col_g = 0.231373; sun_col_b = 0.141176; sun_dir_x = 0.315232; sun_dir_y = 0.132689; sun_dir_z = -0.939693; sun_start_ang = 0; sun_stop_ang = 44.4323; time = 0; max_fog_opacity = 0.836437; setVolFogForClient(ent_player GetLocalClientNumber(),start_dist, half_dist, half_height, base_height, fog_r, fog_g, fog_b, fog_scale, sun_col_r, sun_col_g, sun_col_b, sun_dir_x, sun_dir_y, sun_dir_z, sun_start_ang, sun_stop_ang, time, max_fog_opacity); sunlight = 1.13; sundirection = (-33.34, -38.56, 0); SetSavedDvar( "r_lightTweakSunLight", sunlight ); SetSavedDvar( "r_lightTweakSunDirection", sundirection ); SetSavedDvar("sm_sunSampleSizeNear", "2"); SetSavedDvar( "r_sky_intensity_factor0", 2 ); SetSavedDvar( "r_sky_intensity_useDebugValues", true ); SetSavedDvar( "r_skyColorTemp", (3600)); SetSavedDvar( "r_lightGridEnableTweaks", 1 ); SetSavedDvar( "r_lightGridIntensity", 1.25 ); SetSavedDvar( "r_lightGridContrast", .45 ); if( !IsDefined( ent_player._previous_vision ) ) { ent_player._previous_vision = "zmb"; } new_vision = "zmb"; ent_player clientscripts\zombie_moon_fx::moon_vision_set( ent_player._previous_vision, new_vision, local_clientnum, self.script_int ); ent_player._previous_vision = "zmb"; } moon_tunnels_fog_change(ent_player) { if(!isDefined(ent_player)) { return; } local_clientnum = ent_player GetLocalClientNumber(); ent_player endon("entityshutdown"); start_dist = 1413.46; half_dist = 4300.81; half_height = 32.2476; base_height = -238.873; fog_r = 0.192157; fog_g = 0.137255; fog_b = 0.180392; fog_scale = 3.2984; sun_col_r = 0.34902; sun_col_g = 0.129412; sun_col_b = 0.219608; sun_dir_x = 0.954905; sun_dir_y = 0.280395; sun_dir_z = 0.0976461; sun_start_ang = 0; sun_stop_ang = 0; time = 0; max_fog_opacity = 0.22; setVolFogForClient(ent_player GetLocalClientNumber(),start_dist, half_dist, half_height, base_height, fog_r, fog_g, fog_b, fog_scale, sun_col_r, sun_col_g, sun_col_b, sun_dir_x, sun_dir_y, sun_dir_z, sun_start_ang, sun_stop_ang, time, max_fog_opacity); if( !IsDefined( ent_player._previous_vision ) ) { ent_player._previous_vision = "zmt"; } new_vision = "zmt"; ent_player clientscripts\zombie_moon_fx::moon_vision_set( ent_player._previous_vision, new_vision, local_clientnum, self.script_int ); ent_player._previous_vision = "zmt"; SetSavedDvar( "r_skyColorTemp", (6400)); } moon_nml_fog_change( ent_player ) { if( !IsDefined( ent_player ) || (IsDefined( level._dte_done ) && level._dte_done) ) { return; } local_clientnum = ent_player GetLocalClientNumber(); ent_player endon( "entityshutdown" ); start_dist = 1662.13; half_dist = 18604.1; half_height = 2618.86; base_height = -5373.56; fog_r = 0.764706; fog_g = 0.505882; fog_b = 0.231373; fog_scale = 5; sun_col_r = 0.8; sun_col_g = 0.435294; sun_col_b = 0.101961; sun_dir_x = 0.796421; sun_dir_y = 0.425854; sun_dir_z = 0.429374; sun_start_ang = 0; sun_stop_ang = 45.87; time = 0; max_fog_opacity = 0.72; sunlight = 5; sundirection = (-16, 56.06, 0); suncolor = (.924, .775, .651); SetSavedDvar("sm_sunSampleSizeNear", "1.18"); if( !IsDefined( ent_player._previous_vision ) ) { ent_player._previous_vision = "zmh"; } new_vision = "zmh"; ent_player clientscripts\zombie_moon_fx::moon_vision_set( ent_player._previous_vision, new_vision, local_clientnum, self.script_int ); ent_player._previous_vision = "zmh"; setVolFogForClient(local_clientnum,start_dist, half_dist, half_height, base_height, fog_r, fog_g, fog_b, fog_scale, sun_col_r, sun_col_g, sun_col_b, sun_dir_x, sun_dir_y, sun_dir_z, sun_start_ang, sun_stop_ang, time, max_fog_opacity); setClientDvar( "r_lightTweakSunLight", sunlight); setClientDvar( "r_lightTweakSunColor", suncolor); setClientDvar( "r_lightTweakSunDirection", sundirection); SetSavedDvar( "r_skyColorTemp", (6400)); } moon_vision_set( str_vision_old, str_vision_new, int_clientnum, int_trans ) { if( str_vision_old == str_vision_new ) { return; } if( IsDefined( str_vision_old ) ) { remove_vision = clientscripts\zombie_moon::moon_vision_set_choice( str_vision_old ); clientscripts\_zombiemode::zombie_vision_set_remove( remove_vision[0], 0, int_clientnum ); } if( IsDefined( int_trans ) ) { trans_time = int_trans; } else { trans_time = 0; } start_vision = clientscripts\zombie_moon::moon_vision_set_choice( str_vision_new ); clientscripts\_zombiemode::zombie_vision_set_apply( start_vision[0], start_vision[1], trans_time, int_clientnum ); }