1 #using scripts\codescripts\struct;
3 #insert scripts\shared\shared.gsh;
5 #using scripts\zm\_zm_utility;
7 #namespace zm_server_throttle;
11 if ( !isdefined( level.zombie_server_choke_ids_max ) )
13 level.zombie_server_choke_ids_max = [];
14 level.zombie_server_choke_ids_count = [];
17 level.zombie_server_choke_ids_max[ id ] = max;
18 level.zombie_server_choke_ids_count[ id ] = 0;
29 level.zombie_server_choke_ids_count[ id ] = 0;
36 return( level.zombie_server_choke_ids_count[
id ] < level.zombie_server_choke_ids_max[
id ] );
42 Assert( isdefined( level.zombie_server_choke_ids_max[
id ] ),
"server Choke: " +
id +
" undefined" );
49 level.zombie_server_choke_ids_count[ id ]++;
51 if ( !isdefined( arg1 ) )
53 return ( [[choke_action]]() );
56 if ( !isdefined( arg2 ) )
58 return ( [[choke_action]]( arg1 ) );
61 if ( !isdefined( arg3 ) )
63 return ( [[choke_action]]( arg1, arg2 ) );
66 return ( [[choke_action]]( arg1, arg2, arg3 ) );
72 if( !isdefined( entity ) )
83 if ( !isdefined( level.zombie_server_choke_ids_max ) || !isdefined( level.zombie_server_choke_ids_max[
id ] ) )
88 assert( max == level.zombie_server_choke_ids_max[
id ] );