mirror of
https://github.com/JezuzLizard/Recompilable-gscs-for-BO2-zombies-and-multiplayer.git
synced 2025-06-23 00:57:52 -05:00
Reorganized the scripts so its easier to search thru.
This commit is contained in:
114
Multiplayer Maps/mp_express/maps/mp/_events.gsc
Normal file
114
Multiplayer Maps/mp_express/maps/mp/_events.gsc
Normal file
@ -0,0 +1,114 @@
|
||||
#include maps/mp/gametypes/_globallogic_utils;
|
||||
#include maps/mp/_utility;
|
||||
|
||||
add_timed_event( seconds, notify_string, client_notify_string )
|
||||
{
|
||||
/#
|
||||
assert( seconds >= 0 );
|
||||
#/
|
||||
if ( level.timelimit > 0 )
|
||||
{
|
||||
level thread timed_event_monitor( seconds, notify_string, client_notify_string );
|
||||
}
|
||||
}
|
||||
|
||||
timed_event_monitor( seconds, notify_string, client_notify_string )
|
||||
{
|
||||
for ( ;; )
|
||||
{
|
||||
wait 0,5;
|
||||
if ( !isDefined( level.starttime ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
millisecs_remaining = maps/mp/gametypes/_globallogic_utils::gettimeremaining();
|
||||
seconds_remaining = millisecs_remaining / 1000;
|
||||
if ( seconds_remaining <= seconds )
|
||||
{
|
||||
event_notify( notify_string, client_notify_string );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
add_score_event( score, notify_string, client_notify_string )
|
||||
{
|
||||
/#
|
||||
assert( score >= 0 );
|
||||
#/
|
||||
if ( level.scorelimit > 0 )
|
||||
{
|
||||
if ( level.teambased )
|
||||
{
|
||||
level thread score_team_event_monitor( score, notify_string, client_notify_string );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
level thread score_event_monitor( score, notify_string, client_notify_string );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
any_team_reach_score( score )
|
||||
{
|
||||
_a63 = level.teams;
|
||||
_k63 = getFirstArrayKey( _a63 );
|
||||
while ( isDefined( _k63 ) )
|
||||
{
|
||||
team = _a63[ _k63 ];
|
||||
if ( game[ "teamScores" ][ team ] >= score )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
_k63 = getNextArrayKey( _a63, _k63 );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
score_team_event_monitor( score, notify_string, client_notify_string )
|
||||
{
|
||||
for ( ;; )
|
||||
{
|
||||
wait 0,5;
|
||||
if ( any_team_reach_score( score ) )
|
||||
{
|
||||
event_notify( notify_string, client_notify_string );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
score_event_monitor( score, notify_string, client_notify_string )
|
||||
{
|
||||
for ( ;; )
|
||||
{
|
||||
wait 0,5;
|
||||
players = get_players();
|
||||
i = 0;
|
||||
while ( i < players.size )
|
||||
{
|
||||
if ( isDefined( players[ i ].score ) && players[ i ].score >= score )
|
||||
{
|
||||
event_notify( notify_string, client_notify_string );
|
||||
return;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
event_notify( notify_string, client_notify_string )
|
||||
{
|
||||
if ( isDefined( notify_string ) )
|
||||
{
|
||||
level notify( notify_string );
|
||||
}
|
||||
if ( isDefined( client_notify_string ) )
|
||||
{
|
||||
clientnotify( client_notify_string );
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
|
||||
main()
|
||||
{
|
||||
level.tweakfile = 1;
|
||||
setdvar( "scr_fog_exp_halfplane", "3759.28" );
|
||||
setdvar( "scr_fog_exp_halfheight", "243.735" );
|
||||
setdvar( "scr_fog_nearplane", "601.593" );
|
||||
setdvar( "scr_fog_red", "0.806694" );
|
||||
setdvar( "scr_fog_green", "0.962521" );
|
||||
setdvar( "scr_fog_blue", "0.9624" );
|
||||
setdvar( "scr_fog_baseheight", "-475.268" );
|
||||
setdvar( "visionstore_glowTweakEnable", "0" );
|
||||
setdvar( "visionstore_glowTweakRadius0", "5" );
|
||||
setdvar( "visionstore_glowTweakRadius1", "" );
|
||||
setdvar( "visionstore_glowTweakBloomCutoff", "0.5" );
|
||||
setdvar( "visionstore_glowTweakBloomDesaturation", "0" );
|
||||
setdvar( "visionstore_glowTweakBloomIntensity0", "1" );
|
||||
setdvar( "visionstore_glowTweakBloomIntensity1", "" );
|
||||
setdvar( "visionstore_glowTweakSkyBleedIntensity0", "" );
|
||||
setdvar( "visionstore_glowTweakSkyBleedIntensity1", "" );
|
||||
visionsetnaked( "mp_express", 1 );
|
||||
setdvar( "r_lightGridEnableTweaks", 1 );
|
||||
setdvar( "r_lightGridIntensity", 1 );
|
||||
setdvar( "r_lightGridContrast", 0 );
|
||||
}
|
1832
Multiplayer Maps/mp_express/maps/mp/createfx/mp_express_fx.gsc
Normal file
1832
Multiplayer Maps/mp_express/maps/mp/createfx/mp_express_fx.gsc
Normal file
File diff suppressed because it is too large
Load Diff
65
Multiplayer Maps/mp_express/maps/mp/mp_express.gsc
Normal file
65
Multiplayer Maps/mp_express/maps/mp/mp_express.gsc
Normal file
@ -0,0 +1,65 @@
|
||||
#include maps/mp/mp_express_train;
|
||||
#include maps/mp/_compass;
|
||||
#include common_scripts/utility;
|
||||
#include maps/mp/_utility;
|
||||
|
||||
main()
|
||||
{
|
||||
level.levelspawndvars = ::levelspawndvars;
|
||||
maps/mp/mp_express_fx::main();
|
||||
maps/mp/_load::main();
|
||||
maps/mp/_compass::setupminimap( "compass_map_mp_express" );
|
||||
maps/mp/mp_express_amb::main();
|
||||
game[ "strings" ][ "war_callsign_a" ] = &"MPUI_CALLSIGN_MAPNAME_A";
|
||||
game[ "strings" ][ "war_callsign_b" ] = &"MPUI_CALLSIGN_MAPNAME_B";
|
||||
game[ "strings" ][ "war_callsign_c" ] = &"MPUI_CALLSIGN_MAPNAME_C";
|
||||
game[ "strings" ][ "war_callsign_d" ] = &"MPUI_CALLSIGN_MAPNAME_D";
|
||||
game[ "strings" ][ "war_callsign_e" ] = &"MPUI_CALLSIGN_MAPNAME_E";
|
||||
game[ "strings_menu" ][ "war_callsign_a" ] = "@MPUI_CALLSIGN_MAPNAME_A";
|
||||
game[ "strings_menu" ][ "war_callsign_b" ] = "@MPUI_CALLSIGN_MAPNAME_B";
|
||||
game[ "strings_menu" ][ "war_callsign_c" ] = "@MPUI_CALLSIGN_MAPNAME_C";
|
||||
game[ "strings_menu" ][ "war_callsign_d" ] = "@MPUI_CALLSIGN_MAPNAME_D";
|
||||
game[ "strings_menu" ][ "war_callsign_e" ] = "@MPUI_CALLSIGN_MAPNAME_E";
|
||||
registerclientfield( "vehicle", "train_moving", 1, 1, "int" );
|
||||
registerclientfield( "scriptmover", "train_moving", 1, 1, "int" );
|
||||
if ( getgametypesetting( "allowMapScripting" ) )
|
||||
{
|
||||
maps/mp/mp_express_train::init();
|
||||
}
|
||||
/#
|
||||
level thread devgui_express();
|
||||
execdevgui( "devgui_mp_express" );
|
||||
#/
|
||||
}
|
||||
|
||||
levelspawndvars( reset_dvars )
|
||||
{
|
||||
ss = level.spawnsystem;
|
||||
ss.enemy_influencer_radius = set_dvar_float_if_unset( "scr_spawn_enemy_influencer_radius", "1900", reset_dvars );
|
||||
}
|
||||
|
||||
devgui_express()
|
||||
{
|
||||
/#
|
||||
setdvar( "devgui_notify", "" );
|
||||
for ( ;; )
|
||||
{
|
||||
wait 0,5;
|
||||
devgui_string = getDvar( "devgui_notify" );
|
||||
switch( devgui_string )
|
||||
{
|
||||
case "":
|
||||
break;
|
||||
case "train_start":
|
||||
level notify( "train_start" );
|
||||
break;
|
||||
default:
|
||||
}
|
||||
if ( getDvar( "devgui_notify" ) != "" )
|
||||
{
|
||||
setdvar( "devgui_notify", "" );
|
||||
}
|
||||
#/
|
||||
}
|
||||
}
|
||||
}
|
16
Multiplayer Maps/mp_express/maps/mp/mp_express_amb.gsc
Normal file
16
Multiplayer Maps/mp_express/maps/mp/mp_express_amb.gsc
Normal file
@ -0,0 +1,16 @@
|
||||
#include maps/mp/_ambientpackage;
|
||||
#include maps/mp/_utility;
|
||||
#include common_scripts/utility;
|
||||
|
||||
main()
|
||||
{
|
||||
array_thread( getentarray( "advertisement", "targetname" ), ::advertisements );
|
||||
}
|
||||
|
||||
advertisements()
|
||||
{
|
||||
self playloopsound( "amb_" + self.script_noteworthy + "_ad" );
|
||||
self waittill( "damage" );
|
||||
self stoploopsound();
|
||||
self playloopsound( "amb_" + self.script_noteworthy + "_damaged_ad" );
|
||||
}
|
58
Multiplayer Maps/mp_express/maps/mp/mp_express_fx.gsc
Normal file
58
Multiplayer Maps/mp_express/maps/mp/mp_express_fx.gsc
Normal file
@ -0,0 +1,58 @@
|
||||
#include maps/mp/_utility;
|
||||
|
||||
#using_animtree( "fxanim_props" );
|
||||
|
||||
main()
|
||||
{
|
||||
precache_fxanim_props();
|
||||
precache_scripted_fx();
|
||||
precache_createfx_fx();
|
||||
maps/mp/createfx/mp_express_fx::main();
|
||||
maps/mp/createart/mp_express_art::main();
|
||||
}
|
||||
|
||||
precache_scripted_fx()
|
||||
{
|
||||
level._effect[ "fx_mp_debris_papers" ] = loadfx( "maps/mp_maps/fx_mp_debris_papers" );
|
||||
level._effect[ "fx_paper_interior_short" ] = loadfx( "debris/fx_paper_interior_short" );
|
||||
level._effect[ "fx_mp_light_dust_motes_md" ] = loadfx( "maps/mp_maps/fx_mp_light_dust_motes_md" );
|
||||
level._effect[ "fx_mp_fog_low" ] = loadfx( "maps/mp_maps/fx_mp_fog_low" );
|
||||
level._effect[ "fx_mp_express_train_blow_dust" ] = loadfx( "maps/mp_maps/fx_mp_express_train_blow_dust" );
|
||||
level._effect[ "fx_mp_express_fog_water" ] = loadfx( "maps/mp_maps/fx_mp_express_fog_water" );
|
||||
level._effect[ "fx_mp_fumes_vent_xsm_int" ] = loadfx( "maps/mp_maps/fx_mp_fumes_vent_xsm_int" );
|
||||
level._effect[ "fx_mp_vent_heat_distort" ] = loadfx( "maps/mp_maps/fx_mp_vent_heat_distort" );
|
||||
level._effect[ "fx_insects_swarm_dark_lg" ] = loadfx( "bio/insects/fx_insects_swarm_dark_lg" );
|
||||
level._effect[ "fx_mp_debris_papers_narrow" ] = loadfx( "maps/mp_maps/fx_mp_debris_papers_narrow" );
|
||||
level._effect[ "fx_insects_swarm_lg_light" ] = loadfx( "bio/insects/fx_insects_swarm_lg_light" );
|
||||
level._effect[ "fx_insects_swarm_md_light" ] = loadfx( "bio/insects/fx_insects_swarm_md_light" );
|
||||
level._effect[ "fx_mp_express_train_dust_side2" ] = loadfx( "maps/mp_maps/fx_mp_express_train_dust_side2" );
|
||||
level._effect[ "fx_mp_express_train_dust" ] = loadfx( "maps/mp_maps/fx_mp_express_train_dust" );
|
||||
level._effect[ "fx_mp_express_train_dust_side" ] = loadfx( "maps/mp_maps/fx_mp_express_train_dust_side" );
|
||||
level._effect[ "fx_lf_mp_express_sun1" ] = loadfx( "lens_flares/fx_lf_mp_express_sun1" );
|
||||
level._effect[ "fx_light_god_ray_mp_express" ] = loadfx( "env/light/fx_light_god_ray_mp_express" );
|
||||
level._effect[ "fx_light_god_ray_mp_express2" ] = loadfx( "env/light/fx_light_god_ray_mp_express2" );
|
||||
level._effect[ "fx_window_god_ray" ] = loadfx( "light/fx_window_god_ray" );
|
||||
level._effect[ "fx_express_ceiling_light_big" ] = loadfx( "light/fx_express_ceiling_light_big" );
|
||||
level._effect[ "fx_express_ceiling_light_small" ] = loadfx( "light/fx_express_ceiling_light_small" );
|
||||
level._effect[ "fx_window_god_ray_sm" ] = loadfx( "light/fx_window_god_ray_sm" );
|
||||
level._effect[ "fx_express_train_side_light" ] = loadfx( "light/fx_express_train_side_light" );
|
||||
level._effect[ "fx_express_hall_light_one" ] = loadfx( "light/fx_express_hall_light_one" );
|
||||
level._effect[ "fx_express_hall_light_5" ] = loadfx( "light/fx_express_hall_light_5" );
|
||||
level._effect[ "fx_light_god_ray_mp_slums" ] = loadfx( "env/light/fx_light_god_ray_mp_slums" );
|
||||
level._effect[ "fx_express_ceiling_light_xsm" ] = loadfx( "light/fx_express_ceiling_light_xsm" );
|
||||
level._effect[ "fx_mp_light_police_car" ] = loadfx( "maps/mp_maps/fx_mp_light_police_car" );
|
||||
level._effect[ "fx_drone_rectangle_light_03" ] = loadfx( "light/fx_drone_rectangle_light_03" );
|
||||
level._effect[ "fx_express_flood_light" ] = loadfx( "light/fx_express_flood_light" );
|
||||
level._effect[ "fx_express_flood_light_beam" ] = loadfx( "light/fx_express_flood_light_beam" );
|
||||
level._effect[ "fx_mp_express_vista_smoke01" ] = loadfx( "maps/mp_maps/fx_mp_express_vista_smoke01" );
|
||||
level._effect[ "fx_mp_express_vista_fire01" ] = loadfx( "maps/mp_maps/fx_mp_express_vista_fire01" );
|
||||
}
|
||||
|
||||
precache_createfx_fx()
|
||||
{
|
||||
}
|
||||
|
||||
precache_fxanim_props()
|
||||
{
|
||||
level.scr_anim[ "fxanim_props" ][ "banner_side_thin" ] = %fxanim_mp_express_banner_side_thin_anim;
|
||||
}
|
651
Multiplayer Maps/mp_express/maps/mp/mp_express_train.gsc
Normal file
651
Multiplayer Maps/mp_express/maps/mp/mp_express_train.gsc
Normal file
@ -0,0 +1,651 @@
|
||||
#include maps/mp/killstreaks/_supplydrop;
|
||||
#include maps/mp/gametypes/_gameobjects;
|
||||
#include maps/mp/gametypes/ctf;
|
||||
#include maps/mp/gametypes/_weaponobjects;
|
||||
#include maps/mp/killstreaks/_rcbomb;
|
||||
#include maps/mp/_tacticalinsertion;
|
||||
#include maps/mp/_events;
|
||||
#include common_scripts/utility;
|
||||
#include maps/mp/_utility;
|
||||
|
||||
init()
|
||||
{
|
||||
precachevehicle( "express_train_engine_mp" );
|
||||
precachemodel( "p6_bullet_train_car_phys" );
|
||||
precachemodel( "p6_bullet_train_engine_rev" );
|
||||
precacheshader( "compass_train_carriage" );
|
||||
precachestring( &"traincar" );
|
||||
precachestring( &"trainengine" );
|
||||
gates = getentarray( "train_gate_rail", "targetname" );
|
||||
brushes = getentarray( "train_gate_rail_brush", "targetname" );
|
||||
triggers = getentarray( "train_gate_kill_trigger", "targetname" );
|
||||
traintriggers = getentarray( "train_kill_trigger", "targetname" );
|
||||
_a22 = brushes;
|
||||
_k22 = getFirstArrayKey( _a22 );
|
||||
while ( isDefined( _k22 ) )
|
||||
{
|
||||
brush = _a22[ _k22 ];
|
||||
brush disconnectpaths();
|
||||
_k22 = getNextArrayKey( _a22, _k22 );
|
||||
}
|
||||
waittime = 0,05;
|
||||
_a28 = gates;
|
||||
_k28 = getFirstArrayKey( _a28 );
|
||||
while ( isDefined( _k28 ) )
|
||||
{
|
||||
gate = _a28[ _k28 ];
|
||||
gate.waittime = waittime;
|
||||
waittime += 0,05;
|
||||
gate.og_origin = gate.origin;
|
||||
brush = getclosest( gate.origin, brushes );
|
||||
brush linkto( gate );
|
||||
gate.kill_trigger = getclosest( gate.origin, triggers );
|
||||
if ( isDefined( gate.kill_trigger ) )
|
||||
{
|
||||
gate.kill_trigger enablelinkto();
|
||||
gate.kill_trigger linkto( gate );
|
||||
}
|
||||
_k28 = getNextArrayKey( _a28, _k28 );
|
||||
}
|
||||
start = getvehiclenode( "train_start", "targetname" );
|
||||
endgates = getentarray( "train_gate_rail_end", "targetname" );
|
||||
entrygate = getclosest( start.origin, endgates );
|
||||
i = 0;
|
||||
while ( i < endgates.size )
|
||||
{
|
||||
if ( endgates[ i ] == entrygate )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
exitgate = endgates[ i ];
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
cars = [];
|
||||
cars[ 0 ] = spawnvehicle( "p6_bullet_train_engine_phys", "train", "express_train_engine_mp", start.origin, ( 0, 0, 1 ) );
|
||||
cars[ 0 ] ghost();
|
||||
cars[ 0 ] setcheapflag( 1 );
|
||||
_a64 = traintriggers;
|
||||
_k64 = getFirstArrayKey( _a64 );
|
||||
while ( isDefined( _k64 ) )
|
||||
{
|
||||
traintrigger = _a64[ _k64 ];
|
||||
cars[ 0 ].trainkilltrigger = traintrigger;
|
||||
traintrigger.origin = start.origin;
|
||||
traintrigger enablelinkto();
|
||||
traintrigger linkto( cars[ 0 ] );
|
||||
_k64 = getNextArrayKey( _a64, _k64 );
|
||||
}
|
||||
i = 1;
|
||||
while ( i < 20 )
|
||||
{
|
||||
cars[ i ] = spawn( "script_model", start.origin );
|
||||
cars[ i ] setmodel( "p6_bullet_train_car_phys" );
|
||||
cars[ i ] ghost();
|
||||
cars[ i ] setcheapflag( 1 );
|
||||
i++;
|
||||
}
|
||||
cars[ 20 ] = spawn( "script_model", start.origin );
|
||||
cars[ 20 ] setmodel( "p6_bullet_train_engine_rev" );
|
||||
cars[ 20 ] ghost();
|
||||
cars[ 20 ] setcheapflag( 1 );
|
||||
if ( level.timelimit )
|
||||
{
|
||||
seconds = level.timelimit * 60;
|
||||
add_timed_event( int( seconds * 0,25 ), "train_start" );
|
||||
add_timed_event( int( seconds * 0,75 ), "train_start" );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( level.scorelimit )
|
||||
{
|
||||
add_score_event( int( level.scorelimit * 0,25 ), "train_start" );
|
||||
add_score_event( int( level.scorelimit * 0,75 ), "train_start" );
|
||||
}
|
||||
}
|
||||
level thread train_think( gates, entrygate, exitgate, cars, start );
|
||||
}
|
||||
|
||||
showaftertime( time )
|
||||
{
|
||||
wait time;
|
||||
self show();
|
||||
}
|
||||
|
||||
train_think( gates, entrygate, exitgate, cars, start )
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
for ( ;; )
|
||||
{
|
||||
level waittill( "train_start" );
|
||||
entrygate gate_move( -172 );
|
||||
traintiming = getdvarfloatdefault( "scr_express_trainTiming", 4 );
|
||||
exitgate thread waitthenmove( traintiming, -172 );
|
||||
array_func( gates, ::gate_move, -172 );
|
||||
_a121 = gates;
|
||||
_k121 = getFirstArrayKey( _a121 );
|
||||
while ( isDefined( _k121 ) )
|
||||
{
|
||||
gate = _a121[ _k121 ];
|
||||
gate playloopsound( "amb_train_incomming_beep" );
|
||||
gate playsound( "amb_gate_move" );
|
||||
_k121 = getNextArrayKey( _a121, _k121 );
|
||||
}
|
||||
gatedownwait = getdvarintdefault( "scr_express_gateDownWait", 2 );
|
||||
wait gatedownwait;
|
||||
_a129 = gates;
|
||||
_k129 = getFirstArrayKey( _a129 );
|
||||
while ( isDefined( _k129 ) )
|
||||
{
|
||||
gate = _a129[ _k129 ];
|
||||
gate stoploopsound( 2 );
|
||||
_k129 = getNextArrayKey( _a129, _k129 );
|
||||
}
|
||||
wait 2;
|
||||
cars[ 0 ] attachpath( start );
|
||||
if ( isDefined( cars[ 0 ].trainkilltrigger ) )
|
||||
{
|
||||
cars[ 0 ] thread train_move_think( cars[ 0 ].trainkilltrigger );
|
||||
}
|
||||
cars[ 0 ] startpath();
|
||||
cars[ 0 ] showaftertime( 0,2 );
|
||||
cars[ 0 ] thread record_positions();
|
||||
cars[ 0 ] thread watch_end();
|
||||
cars[ 0 ] playloopsound( "amb_train_lp" );
|
||||
cars[ 0 ] setclientfield( "train_moving", 1 );
|
||||
next = "_b";
|
||||
i = 1;
|
||||
while ( i < cars.size )
|
||||
{
|
||||
if ( i == 1 )
|
||||
{
|
||||
wait 0,4;
|
||||
}
|
||||
else
|
||||
{
|
||||
wait 0,35;
|
||||
}
|
||||
if ( i >= 3 && ( i % 3 ) == 0 )
|
||||
{
|
||||
cars[ i ] playloopsound( "amb_train_lp" + next );
|
||||
switch( next )
|
||||
{
|
||||
case "_b":
|
||||
next = "_c";
|
||||
break;
|
||||
break;
|
||||
case "_c":
|
||||
next = "_d";
|
||||
break;
|
||||
break;
|
||||
case "_d":
|
||||
next = "";
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
next = "_b";
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
cars[ i ] thread watch_player_touch();
|
||||
if ( i == ( cars.size - 1 ) )
|
||||
{
|
||||
cars[ i ] thread car_move();
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
cars[ i ] thread car_move();
|
||||
}
|
||||
i++;
|
||||
}
|
||||
traintiming = getdvarfloatdefault( "scr_express_trainTiming2", 2 );
|
||||
entrygate thread waitthenmove( traintiming );
|
||||
gateupwait = getdvarfloatdefault( "scr_express_gateUpWait", 6,5 );
|
||||
wait gateupwait;
|
||||
exitgate gate_move();
|
||||
array_func( gates, ::gate_move );
|
||||
_a205 = gates;
|
||||
_k205 = getFirstArrayKey( _a205 );
|
||||
while ( isDefined( _k205 ) )
|
||||
{
|
||||
gate = _a205[ _k205 ];
|
||||
gate playsound( "amb_gate_move" );
|
||||
_k205 = getNextArrayKey( _a205, _k205 );
|
||||
}
|
||||
wait 6;
|
||||
}
|
||||
}
|
||||
|
||||
waitthenmove( time, distance )
|
||||
{
|
||||
wait time;
|
||||
self gate_move( distance );
|
||||
}
|
||||
|
||||
record_positions()
|
||||
{
|
||||
self endon( "reached_end_node" );
|
||||
if ( isDefined( level.train_positions ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
level.train_positions = [];
|
||||
level.train_angles = [];
|
||||
for ( ;; )
|
||||
{
|
||||
level.train_positions[ level.train_positions.size ] = self.origin;
|
||||
level.train_angles[ level.train_angles.size ] = self.angles;
|
||||
wait 0,05;
|
||||
}
|
||||
}
|
||||
|
||||
watch_player_touch()
|
||||
{
|
||||
self endon( "end_of_track" );
|
||||
self endon( "delete" );
|
||||
self endon( "death" );
|
||||
for ( ;; )
|
||||
{
|
||||
self waittill( "touch", entity );
|
||||
if ( isplayer( entity ) )
|
||||
{
|
||||
entity dodamage( entity.health * 2, self.origin + ( 0, 0, 1 ), self, self, 0, "MOD_CRUSH" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
watch_end()
|
||||
{
|
||||
self waittill( "reached_end_node" );
|
||||
self ghost();
|
||||
self setclientfield( "train_moving", 0 );
|
||||
self stoploopsound( 0,2 );
|
||||
self playsound( "amb_train_end" );
|
||||
}
|
||||
|
||||
car_move()
|
||||
{
|
||||
self setclientfield( "train_moving", 1 );
|
||||
i = 0;
|
||||
while ( i < level.train_positions.size )
|
||||
{
|
||||
self.origin = level.train_positions[ i ];
|
||||
self.angles = level.train_angles[ i ];
|
||||
wait 0,05;
|
||||
if ( i == 4 )
|
||||
{
|
||||
self show();
|
||||
}
|
||||
i++;
|
||||
}
|
||||
self notify( "end_of_track" );
|
||||
self ghost();
|
||||
self setclientfield( "train_moving", 0 );
|
||||
self stoploopsound( 0,2 );
|
||||
self playsound( "amb_train_end" );
|
||||
}
|
||||
|
||||
gate_rotate( yaw )
|
||||
{
|
||||
self rotateyaw( yaw, 5 );
|
||||
}
|
||||
|
||||
gate_move( z_dist )
|
||||
{
|
||||
if ( isDefined( self.kill_trigger ) )
|
||||
{
|
||||
self thread gate_move_think( isDefined( z_dist ) );
|
||||
}
|
||||
if ( !isDefined( z_dist ) )
|
||||
{
|
||||
self moveto( self.og_origin, 5 );
|
||||
}
|
||||
else
|
||||
{
|
||||
self.og_origin = self.origin;
|
||||
self movez( z_dist, 5 );
|
||||
}
|
||||
}
|
||||
|
||||
train_move_think( kill_trigger )
|
||||
{
|
||||
self endon( "movedone" );
|
||||
for ( ;; )
|
||||
{
|
||||
wait 0,05;
|
||||
pixbeginevent( "train_move_think" );
|
||||
entities = getdamageableentarray( self.origin, 200 );
|
||||
_a327 = entities;
|
||||
_k327 = getFirstArrayKey( _a327 );
|
||||
while ( isDefined( _k327 ) )
|
||||
{
|
||||
entity = _a327[ _k327 ];
|
||||
if ( isDefined( entity.targetname ) && entity.targetname == "train" )
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( isplayer( entity ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if ( !entity istouching( kill_trigger ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if ( isDefined( entity.model ) && entity.model == "t6_wpn_tac_insert_world" )
|
||||
{
|
||||
entity maps/mp/_tacticalinsertion::destroy_tactical_insertion();
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !isalive( entity ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if ( isDefined( entity.targetname ) )
|
||||
{
|
||||
if ( entity.targetname == "talon" )
|
||||
{
|
||||
entity notify( "death" );
|
||||
break;
|
||||
}
|
||||
else if ( entity.targetname == "rcbomb" )
|
||||
{
|
||||
entity maps/mp/killstreaks/_rcbomb::rcbomb_force_explode();
|
||||
break;
|
||||
}
|
||||
else if ( entity.targetname == "riotshield_mp" )
|
||||
{
|
||||
entity dodamage( 1, self.origin + ( 0, 0, 1 ), self, self, 0, "MOD_CRUSH" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ( isDefined( entity.helitype ) && entity.helitype == "qrdrone" )
|
||||
{
|
||||
watcher = entity.owner maps/mp/gametypes/_weaponobjects::getweaponobjectwatcher( "qrdrone" );
|
||||
watcher thread maps/mp/gametypes/_weaponobjects::waitanddetonate( entity, 0, undefined );
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( entity.classname == "grenade" )
|
||||
{
|
||||
if ( !isDefined( entity.name ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if ( !isDefined( entity.owner ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if ( entity.name == "proximity_grenade_mp" )
|
||||
{
|
||||
watcher = entity.owner getwatcherforweapon( entity.name );
|
||||
watcher thread maps/mp/gametypes/_weaponobjects::waitanddetonate( entity, 0, undefined, "script_mover_mp" );
|
||||
break;
|
||||
}
|
||||
else if ( !isweaponequipment( entity.name ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
else watcher = entity.owner getwatcherforweapon( entity.name );
|
||||
if ( !isDefined( watcher ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
else watcher thread maps/mp/gametypes/_weaponobjects::waitanddetonate( entity, 0, undefined, "script_mover_mp" );
|
||||
break;
|
||||
}
|
||||
else if ( entity.classname == "auto_turret" )
|
||||
{
|
||||
if ( !isDefined( entity.damagedtodeath ) || !entity.damagedtodeath )
|
||||
{
|
||||
entity domaxdamage( self.origin + ( 0, 0, 1 ), self, self, 0, "MOD_CRUSH" );
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
entity dodamage( entity.health * 2, self.origin + ( 0, 0, 1 ), self, self, 0, "MOD_CRUSH" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_k327 = getNextArrayKey( _a327, _k327 );
|
||||
}
|
||||
self destroy_supply_crates();
|
||||
if ( level.gametype == "ctf" )
|
||||
{
|
||||
_a434 = level.flags;
|
||||
_k434 = getFirstArrayKey( _a434 );
|
||||
while ( isDefined( _k434 ) )
|
||||
{
|
||||
flag = _a434[ _k434 ];
|
||||
if ( flag.curorigin != flag.trigger.baseorigin && flag.visuals[ 0 ] istouching( kill_trigger ) )
|
||||
{
|
||||
flag maps/mp/gametypes/ctf::returnflag();
|
||||
}
|
||||
_k434 = getNextArrayKey( _a434, _k434 );
|
||||
}
|
||||
}
|
||||
else if ( level.gametype == "sd" && !level.multibomb )
|
||||
{
|
||||
if ( level.sdbomb.visuals[ 0 ] istouching( kill_trigger ) )
|
||||
{
|
||||
level.sdbomb maps/mp/gametypes/_gameobjects::returnhome();
|
||||
}
|
||||
}
|
||||
pixendevent();
|
||||
}
|
||||
}
|
||||
|
||||
gate_move_think( ignoreplayers )
|
||||
{
|
||||
self endon( "movedone" );
|
||||
corpse_delay = 0;
|
||||
if ( isDefined( self.waittime ) )
|
||||
{
|
||||
wait self.waittime;
|
||||
}
|
||||
for ( ;; )
|
||||
{
|
||||
wait 0,4;
|
||||
pixbeginevent( "gate_move_think" );
|
||||
entities = getdamageableentarray( self.origin, 100 );
|
||||
_a473 = entities;
|
||||
_k473 = getFirstArrayKey( _a473 );
|
||||
while ( isDefined( _k473 ) )
|
||||
{
|
||||
entity = _a473[ _k473 ];
|
||||
if ( ignoreplayers == 1 && isplayer( entity ) )
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !entity istouching( self.kill_trigger ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if ( isDefined( entity.model ) && entity.model == "t6_wpn_tac_insert_world" )
|
||||
{
|
||||
entity maps/mp/_tacticalinsertion::destroy_tactical_insertion();
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !isalive( entity ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if ( isDefined( entity.targetname ) )
|
||||
{
|
||||
if ( entity.targetname == "talon" )
|
||||
{
|
||||
entity notify( "death" );
|
||||
break;
|
||||
}
|
||||
else if ( entity.targetname == "rcbomb" )
|
||||
{
|
||||
entity maps/mp/killstreaks/_rcbomb::rcbomb_force_explode();
|
||||
break;
|
||||
}
|
||||
else if ( entity.targetname == "riotshield_mp" )
|
||||
{
|
||||
entity dodamage( 1, self.origin + ( 0, 0, 1 ), self, self, 0, "MOD_CRUSH" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ( isDefined( entity.helitype ) && entity.helitype == "qrdrone" )
|
||||
{
|
||||
watcher = entity.owner maps/mp/gametypes/_weaponobjects::getweaponobjectwatcher( "qrdrone" );
|
||||
watcher thread maps/mp/gametypes/_weaponobjects::waitanddetonate( entity, 0, undefined );
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( entity.classname == "grenade" )
|
||||
{
|
||||
if ( !isDefined( entity.name ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if ( !isDefined( entity.owner ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if ( entity.name == "proximity_grenade_mp" )
|
||||
{
|
||||
watcher = entity.owner getwatcherforweapon( entity.name );
|
||||
watcher thread maps/mp/gametypes/_weaponobjects::waitanddetonate( entity, 0, undefined, "script_mover_mp" );
|
||||
break;
|
||||
}
|
||||
else if ( !isweaponequipment( entity.name ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
else watcher = entity.owner getwatcherforweapon( entity.name );
|
||||
if ( !isDefined( watcher ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
else watcher thread maps/mp/gametypes/_weaponobjects::waitanddetonate( entity, 0, undefined, "script_mover_mp" );
|
||||
break;
|
||||
}
|
||||
else if ( entity.classname == "auto_turret" )
|
||||
{
|
||||
if ( !isDefined( entity.damagedtodeath ) || !entity.damagedtodeath )
|
||||
{
|
||||
entity domaxdamage( self.origin + ( 0, 0, 1 ), self, self, 0, "MOD_CRUSH" );
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
entity dodamage( entity.health * 2, self.origin + ( 0, 0, 1 ), self, self, 0, "MOD_CRUSH" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_k473 = getNextArrayKey( _a473, _k473 );
|
||||
}
|
||||
self destroy_supply_crates();
|
||||
if ( getTime() > corpse_delay )
|
||||
{
|
||||
self destroy_corpses();
|
||||
}
|
||||
if ( level.gametype == "ctf" )
|
||||
{
|
||||
_a578 = level.flags;
|
||||
_k578 = getFirstArrayKey( _a578 );
|
||||
while ( isDefined( _k578 ) )
|
||||
{
|
||||
flag = _a578[ _k578 ];
|
||||
if ( flag.visuals[ 0 ] istouching( self.kill_trigger ) )
|
||||
{
|
||||
flag maps/mp/gametypes/ctf::returnflag();
|
||||
}
|
||||
_k578 = getNextArrayKey( _a578, _k578 );
|
||||
}
|
||||
}
|
||||
else if ( level.gametype == "sd" && !level.multibomb )
|
||||
{
|
||||
if ( level.sdbomb.visuals[ 0 ] istouching( self.kill_trigger ) )
|
||||
{
|
||||
level.sdbomb maps/mp/gametypes/_gameobjects::returnhome();
|
||||
}
|
||||
}
|
||||
pixendevent();
|
||||
}
|
||||
}
|
||||
|
||||
getwatcherforweapon( weapname )
|
||||
{
|
||||
if ( !isDefined( self ) )
|
||||
{
|
||||
return undefined;
|
||||
}
|
||||
if ( !isplayer( self ) )
|
||||
{
|
||||
return undefined;
|
||||
}
|
||||
i = 0;
|
||||
while ( i < self.weaponobjectwatcherarray.size )
|
||||
{
|
||||
if ( self.weaponobjectwatcherarray[ i ].weapon != weapname )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
return self.weaponobjectwatcherarray[ i ];
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
destroy_supply_crates()
|
||||
{
|
||||
crates = getentarray( "care_package", "script_noteworthy" );
|
||||
_a628 = crates;
|
||||
_k628 = getFirstArrayKey( _a628 );
|
||||
while ( isDefined( _k628 ) )
|
||||
{
|
||||
crate = _a628[ _k628 ];
|
||||
if ( distancesquared( crate.origin, self.origin ) < 10000 )
|
||||
{
|
||||
if ( crate istouching( self ) )
|
||||
{
|
||||
playfx( level._supply_drop_explosion_fx, crate.origin );
|
||||
playsoundatposition( "wpn_grenade_explode", crate.origin );
|
||||
wait 0,1;
|
||||
crate maps/mp/killstreaks/_supplydrop::cratedelete();
|
||||
}
|
||||
}
|
||||
_k628 = getNextArrayKey( _a628, _k628 );
|
||||
}
|
||||
}
|
||||
|
||||
destroy_corpses()
|
||||
{
|
||||
corpses = getcorpsearray();
|
||||
i = 0;
|
||||
while ( i < corpses.size )
|
||||
{
|
||||
if ( distancesquared( corpses[ i ].origin, self.origin ) < 10000 )
|
||||
{
|
||||
corpses[ i ] delete();
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user