109 GameLogEcho(sprintf(
":ctf:%s:%d:%d:%s", mode, flagteam, actor.team, ((actor !=
NULL) ?
ftos(actor.playerid) :
"")));
116 float cap_time = (
time - flag.ctf_pickuptime);
124 else if(cap_time < cap_record)
161 WaypointSprite_Spawn(WP_FlagCarrier, 0, 0, player,
FLAG_WAYPOINT_OFFSET,
NULL, player.team, player,
wps_flagcarrier,
true, RADARICON_FLAG);
166 if(player.flagcarried &&
CTF_SAMETEAM(player, player.flagcarried))
168 if(!player.wps_enemyflagcarrier)
170 entity base_wp = WP_FlagCarrier;
175 case NUM_TEAM_1: base_wp = WP_FlagCarrierEnemyRed;
break;
176 case NUM_TEAM_2: base_wp = WP_FlagCarrierEnemyBlue;
break;
177 case NUM_TEAM_3: base_wp = WP_FlagCarrierEnemyYellow;
break;
178 case NUM_TEAM_4: base_wp = WP_FlagCarrierEnemyPink;
break;
179 default: base_wp = WP_FlagCarrierEnemyNeutral;
break;
191 if(!player.wps_flagreturn)
194 owp.colormod =
'0 0.8 0.8';
203 float current_distance =
vlen(((
'1 0 0' * to.x) + (
'0 1 0' * to.y)) - ((
'1 0 0' * from.x) + (
'0 1 0' * from.y)));
205 float current_height = (initial_height *
min(1, (current_distance / flag.pass_distance)));
211 targpos = (to + (
'0 0 1' * current_height));
223 else { targpos = to; }
244 h =
vlen(head_center - passer_center);
248 float distance_from_line =
vlen(nearest_to_passer - nearest_on_line);
258 else {
return true; }
268 int s,
s2, s3, s4, se, se2, se3, se4, sr, ser;
269 int players_worseeq, players_total;
279 sr = ((s -
s2) + (s3 + s4));
284 players_total = players_worseeq = 0;
293 ser = ((se - se2) + (se3 + se4));
312 if((wanted_status == player.ctf_captureshielded) && (updated_status != wanted_status))
314 Send_Notification(NOTIF_ONE, player, MSG_CENTER, ((updated_status) ? CENTER_CTF_CAPTURESHIELD_SHIELDED : CENTER_CTF_CAPTURESHIELD_FREE));
315 player.ctf_captureshielded = updated_status;
321 if(!client.ctf_captureshielded) {
return false; }
329 if(!
toucher.ctf_captureshielded) {
return; }
341 entity shield =
new(ctf_captureshield);
344 shield.team = flag.team;
350 shield.avelocity =
'7 0 11';
353 setorigin(shield, flag.origin);
355 setsize(shield, shield.scale * shield.mins, shield.scale * shield.maxs);
366 player = (player ? player : flag.pass_sender);
371 flag.angles =
'0 0 0';
376 flag.ctf_droptime =
time;
377 flag.ctf_landtime = 0;
378 flag.ctf_dropper = player;
382 if(flag.damagedbycontents)
399 case NUM_TEAM_1: base_wp = WP_FlagDroppedRed;
break;
400 case NUM_TEAM_2: base_wp = WP_FlagDroppedBlue;
break;
401 case NUM_TEAM_3: base_wp = WP_FlagDroppedYellow;
break;
402 case NUM_TEAM_4: base_wp = WP_FlagDroppedPink;
break;
403 default: base_wp = WP_FlagDroppedNeutral;
break;
421 flag.pass_distance = 0;
422 flag.pass_sender =
NULL;
423 flag.pass_target =
NULL;
429 entity sender = flag.pass_sender;
433 flag.owner.flagcarried = flag;
440 setattachment(flag, player.vehicle,
"");
446 setattachment(flag, player,
"");
451 flag.angles =
'0 0 0';
461 else if(it == player)
464 Send_Notification(NOTIF_ONE, it, MSG_CENTER,
APP_NUM(flag.team, CENTER_CTF_PASS_OTHER), sender.netname, player.netname);
471 player.throw_antispam = sender.throw_antispam;
473 flag.pass_distance = 0;
474 flag.pass_sender =
NULL;
475 flag.pass_target =
NULL;
480 entity flag = player.flagcarried;
481 vector targ_origin, flag_velocity;
483 if(!flag) {
return; }
484 if((droptype ==
DROP_PASS) && !receiver) {
return; }
486 if(flag.speedrunning || flag.classname ==
"phantomflag")
491 if(player.wps_enemyflagcarrier)
494 if(player.wps_flagreturn)
501 setattachment(flag,
NULL,
"");
502 tracebox(player.origin +
vec3(0, 0, player.mins.z - flag.m_mins.z),
511 setsize(flag, player.mins, player.maxs);
513 flag.owner.flagcarried =
NULL;
516 flag.ctf_dropper = player;
517 flag.ctf_droptime =
time;
518 flag.ctf_landtime = 0;
533 flag.pass_distance =
vlen(((
'1 0 0' * targ_origin.x) + (
'0 1 0' * targ_origin.y)) - ((
'1 0 0' * player.origin.x) + (
'0 1 0' * player.origin.y)));
539 flag.pass_sender = player;
540 flag.pass_target = receiver;
563 flag.velocity =
'0 0 0';
581 if(player.wps_enemyflagcarrier)
584 if(player.wps_flagreturn)
592void shockwave_spawn(
string m,
vector org,
float sz,
float t1,
float t2)
594 return modeleffect_spawn(m, 0, 0,
org,
'0 0 0',
'0 0 0',
'0 0 0', 0, sz, 1, t1, t2);
609 float old_time, new_time;
611 if(!player) {
return; }
613 if((flag.cnt || enemy_flag.cnt) && flag.cnt != enemy_flag.cnt) {
return; }
615 if (
toucher.goalentity == flag.bot_basewaypoint)
616 toucher.goalentity_lock_timeout = 0;
622 player_team_flag = it;
629 player.throw_prevtime =
time;
630 player.throw_count = 0;
646 if(enemy_flag.score_capture || flag.score_capture)
647 pscore =
floor((
max(1, enemy_flag.score_capture) +
max(1, flag.score_capture)) * 0.5);
650 if(enemy_flag.score_team_capture || flag.score_team_capture)
651 capscore =
floor((
max(1, enemy_flag.score_team_capture) +
max(1, flag.score_team_capture)) * 0.5);
656 if(!old_time || new_time < old_time)
662 shockwave_spawn(
"models/ctf/shockwavetransring.md3", flag.origin -
'0 0 15', -0.8, 0, 1);
671 if((enemy_flag.ctf_dropper) && (player != enemy_flag.ctf_dropper))
716 if(player.flagcarried == flag)
728 float pickup_dropped_score;
734 newflag.classname =
"phantomflag";
744 player.flagcarried = flag;
749 setattachment(flag, player.vehicle,
"");
755 setattachment(flag, player,
"");
762 flag.angles =
'0 0 0';
765 flag.damagedbycontents =
false;
820 LOG_TRACE(
"pickup_dropped_score is ",
ftos(pickup_dropped_score));
832 flag.speedrunning = player.speedrunning;
838 Send_Effect_(flag.toucheffect, player.origin,
'0 0 0', 1);
855 if (flag.wps_flagdropped
905 int stale_flags = 0, stale_red_flags = 0, stale_blue_flags = 0, stale_yellow_flags = 0, stale_pink_flags = 0, stale_neutral_flags = 0;
915 it.ctf_staleflagnext = ctf_staleflaglist;
916 ctf_staleflaglist = it;
924 default: ++stale_neutral_flags;
break;
930 stale_flags = (stale_neutral_flags >= 1);
932 stale_flags = (stale_red_flags >= 1) + (stale_blue_flags >= 1) + (stale_yellow_flags >= 1) + (stale_pink_flags >= 1);
936 else if(stale_flags >= 2)
946 for(
entity tmp_entity = ctf_staleflaglist; tmp_entity; tmp_entity = tmp_entity.ctf_staleflagnext)
948 if((tmp_entity.owner) && (!tmp_entity.owner.wps_enemyflagcarrier))
950 entity base_wp = WP_FlagCarrier;
953 switch (tmp_entity.owner.team)
955 case NUM_TEAM_1: base_wp = WP_FlagCarrierEnemyRed;
break;
956 case NUM_TEAM_2: base_wp = WP_FlagCarrierEnemyBlue;
break;
957 case NUM_TEAM_3: base_wp = WP_FlagCarrierEnemyYellow;
break;
958 case NUM_TEAM_4: base_wp = WP_FlagCarrierEnemyPink;
break;
959 default: base_wp = WP_FlagCarrierEnemyNeutral;
break;
1080 CS(this.
owner).impulse = CHIMPULSE_SPEEDRUN.impulse;
1127 LOG_TRACE(
"ctf_FlagThink(): Flag exists with no status?");
1149 if(!flag.ctf_flagdamaged_byworld) {
return; }
1169 if(
time > flag.wait)
1171 Send_Effect_(flag.toucheffect, flag.origin,
'0 0 0', 1);
1179 switch(flag.ctf_status)
1187 else if(!flag.team && (!
toucher.flagcarried) && (!
toucher.ctf_captureshielded) && (
time >
toucher.next_take_time) && is_not_monster)
1213 LOG_TRACE(
"Someone touched a flag even though it was being carried?");
1225 else if(is_not_monster && (!
toucher.flagcarried))
1241 if((flag.owner) && (flag.owner.flagcarried == flag))
1247 flag.owner.flagcarried =
NULL;
1250 if(flag.speedrunning)
1254 if((flag.owner) && (flag.owner.vehicle))
1261 setattachment(flag,
NULL,
"");
1263 setorigin(flag, flag.ctf_spawnorigin);
1269 flag.velocity =
'0 0 0';
1270 flag.angles = flag.mangle;
1273 flag.damagedbycontents =
false;
1281 flag.pass_distance = 0;
1282 flag.pass_sender =
NULL;
1283 flag.pass_target =
NULL;
1284 flag.ctf_dropper =
NULL;
1285 flag.ctf_pickuptime = 0;
1286 flag.ctf_droptime = 0;
1287 flag.ctf_landtime = 0;
1288 flag.ctf_flagdamaged_byworld =
false;
1293 if(flag.classname ==
"phantomflag")
1310 entity flag = e.flagcarried;
1313 if(flag && (flag.cnt || wp_owner.cnt) && wp_owner.cnt != flag.cnt)
1328 case NUM_TEAM_1: basename = WP_FlagBaseRed;
break;
1329 case NUM_TEAM_2: basename = WP_FlagBaseBlue;
break;
1330 case NUM_TEAM_3: basename = WP_FlagBaseYellow;
break;
1331 case NUM_TEAM_4: basename = WP_FlagBasePink;
break;
1332 default: basename = WP_FlagBaseNeutral;
break;
1355 setattachment(flag,
NULL,
"");
1358 flag.team = teamnum;
1359 flag.classname =
"item_flag_team";
1360 flag.target =
"###item###";
1371 flag.pushable =
true;
1375 flag.damagedbycontents =
false;
1377 flag.velocity =
'0 0 0';
1378 flag.mangle = flag.angles;
1387 flag.colormap = (teamnum) ? (teamnum - 1) * 0x11 : 0x00;
1388 flag.colormap |=
BIT(10);
1392 flag.cnt = flag.score_assist = flag.score_team_capture = flag.score_capture = flag.score_drop = flag.score_pickup = flag.score_return = 0;
1397 if(flag.skin == 0) { flag.skin =
cvar(sprintf(
"g_ctf_flag_%s_skin", teamname)); }
1398 if(flag.model ==
"") { flag.model =
cvar_string(sprintf(
"g_ctf_flag_%s_model", teamname)); }
1399 if (flag.toucheffect ==
"") { flag.toucheffect =
EFFECT_FLAG_TOUCH(teamnum).eent_eff_name; }
1400 if (flag.passeffect ==
"") { flag.passeffect =
EFFECT_PASS(teamnum).eent_eff_name; }
1401 if (flag.capeffect ==
"") { flag.capeffect =
EFFECT_CAP(teamnum).eent_eff_name; }
1405 if(flag.s == "") flag.s = b; \
1406 precache_sound(flag.s);
1418 precache_model(flag.model);
1421 _setmodel(flag, flag.model);
1423 flag.m_mins = flag.mins;
1424 flag.m_maxs = flag.maxs;
1431 case NUM_TEAM_1: flag.glow_color = 251;
break;
1432 case NUM_TEAM_2: flag.glow_color = 210;
break;
1433 case NUM_TEAM_3: flag.glow_color = 110;
break;
1434 case NUM_TEAM_4: flag.glow_color = 145;
break;
1435 default: flag.glow_color = 254;
break;
1437 flag.glow_size = 25;
1438 flag.glow_trail = 1;
1456 if((flag.spawnflags & 1) || flag.noalign)
1458 flag.dropped_origin = flag.origin;
1459 flag.noalign =
true;
1464 flag.noalign =
false;
1490 if(!f1 && it.team == NUM_TEAM_1)
1492 else if(!f2 && it.team == NUM_TEAM_2)
1541 else if(!bot.flagcarried)
1562 if(
vdist(it.origin -
org, <, tc_radius))
1571void havocbot_goalrating_ctf_ourflag(
entity this,
float ratingscale)
1574 head = ctf_worldflaglist;
1579 head = head.ctf_worldflagnext;
1592 if((this.
flagcarried.cnt || it.cnt) &&
this.flagcarried.cnt != it.cnt)
1641 chosen = chosen.tag_entity;
1643 ratingscale += ratingscale * f * 0.1;
1688 if(it.tag_entity==
NULL)
1692 if(
vdist(
org - it.origin, <, df_radius))
1703 float cdefense, cmiddle, coffense;
1751 else if (
count == 2)
1768 if(cdefense<=coffense)
1770 else if(coffense<=cmiddle)
1782 if (item.classname !=
"waypoint")
1812 vector base_org = mf.dropped_origin;
1813 float base_rating = (mf.ctf_status ==
FLAG_BASE) ? 10000 : (
vdist(this.
origin - base_org, >, 100) ? 2000 : 1000);
1839 Damage(
this,
this,
this, 100000, DEATH_KILL.m_id,
DMG_NOWEP,
this.origin,
'0 0 0');
1865 this.havocbot_role = this.havocbot_previous_role;
1877 if (mf.ctf_status !=
FLAG_BASE &&
vdist(ef.origin - mf.dropped_origin, <, 900))
1892 this.havocbot_role = this.havocbot_previous_role;
1938 pos = mf.tag_entity.origin;
1954 pos = ef.tag_entity.origin;
1958 if(
vdist(pos - mf.dropped_origin, >, 700))
2011 if (mf.enemy ==
this)
2028 const float RT_RADIUS = 10000;
2037 vector enemy_base_org = ef.dropped_origin;
2148 float distance, bestdistance = 10000;
2150 distance =
vlen(
org - it.origin);
2151 if(distance<bestdistance)
2154 bestdistance = distance;
2179 string s =
"(null)";
2185 bot.havocbot_role_timeout = 0;
2186 bot.havocbot_cantfindflag =
time + 10;
2187 if (bot.havocbot_previous_role != bot.havocbot_role)
2193 bot.havocbot_role_timeout = 0;
2198 bot.havocbot_role_timeout = 0;
2203 bot.havocbot_role_timeout = 0;
2207 bot.havocbot_previous_role = bot.havocbot_role;
2209 bot.havocbot_role_timeout =
time + 10;
2210 if (bot.havocbot_previous_role != bot.havocbot_role)
2215 bot.havocbot_previous_role = bot.havocbot_role;
2217 bot.havocbot_role_timeout =
time + 30;
2218 if (bot.havocbot_previous_role != bot.havocbot_role)
2222 LOG_TRACE(bot.netname,
" switched to ", s);
2254 STAT(OBJECTIVE_STATUS, player) |= CTF_FLAG_NEUTRAL;
2258 if(it.owner == player || it.pass_sender == player)
2260 else if(it.ctf_status == FLAG_DROPPED)
2262 else if(it.ctf_status != FLAG_BASE)
2265 if(!bestflag || prio > bestprio)
2274 int t = 0, t2 = 0, t3 = 0;
2275 switch(bestflag.team)
2284 switch(bestflag.ctf_status)
2289 if((bestflag.owner == player) || (bestflag.pass_sender == player))
2290 STAT(OBJECTIVE_STATUS, player) |= t;
2292 STAT(OBJECTIVE_STATUS, player) |= t2;
2297 STAT(OBJECTIVE_STATUS, player) |= t3;
2305 if(player.ctf_captureshielded)
2314 if(player.wps_flagcarrier)
2325 if(frag_attacker.flagcarried)
2368 tmp_entity.ctf_dropper =
NULL;
2380 if(player.flagcarried)
2385 if(it.pass_sender == player) { it.pass_sender =
NULL; }
2386 if(it.pass_target == player) { it.pass_target =
NULL; }
2387 if(it.ctf_dropper == player) { it.ctf_dropper =
NULL; }
2429 if(player.flagcarried)
2451 if(head != player &&
SAME_TEAM(head, player))
2452 if(!head.speedrunning && !head.vehicle)
2464 Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname);
2469 Send_Notification(NOTIF_ONE, head, MSG_CENTER, CENTER_CTF_PASS_REQUESTED, player.netname);
2470 Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname);
2475 else if(player.flagcarried && !head.flagcarried)
2480 if(
vlen2(passer_center - head_center) <
vlen2(passer_center - closest_target_center))
2481 { closest_target = head; }
2483 else { closest_target = head; }
2496 if(player.throw_count == -1)
2500 player.throw_prevtime =
time;
2501 player.throw_count = 1;
2514 else { player.throw_count += 1; }
2517 player.throw_prevtime =
time;
2529 if(player.wps_flagcarrier)
2531 player.wps_helpme_time =
time;
2536 WaypointSprite_Spawn(WP_Helpme,
waypointsprite_deployed_lifetime,
waypointsprite_limitedrange, player,
FLAG_WAYPOINT_OFFSET,
NULL, player.team, player,
wps_helpme,
false, RADARICON_HELPME);
2548 if(player.flagcarried)
2556 player.flagcarried.nodrawtoclient = player;
2557 setattachment(player.flagcarried, veh,
"");
2570 if(player.flagcarried)
2572 setattachment(player.flagcarried, player,
"");
2575 player.flagcarried.angles =
'0 0 0';
2576 player.flagcarried.nodrawtoclient =
NULL;
2585 if(player.flagcarried)
2597 switch(it.ctf_status)
2606 it.nextthink =
false;
2633 M_ARGV(1,
string) =
"ctf_team";
2638 int record_page =
M_ARGV(0,
int);
2639 string ret_string =
M_ARGV(1,
string);
2641 for(
int i = record_page * 200; i <
MapInfo_count && i < record_page * 200 + 200; ++i)
2656 M_ARGV(1,
string) = ret_string;
2660void superspec_msg(
string _center_title,
string _con_title,
entity _to,
string _msg,
float _spamlevel);
2689 if(it.flagcarried && (it.team == _team || _team == 0))
2692 if(_team == 0 &&
IS_SPEC(player) && player.enemy == it)
2699 superspec_msg(
"",
"", player,
"No active flag carrier\n", 1);
2715 if(player.flagcarried)
2737 if(!
g_ctf) {
delete(
this);
return; }
2755 if(!
g_ctf) {
delete(
this);
return; }
2773 if(!
g_ctf) {
delete(
this);
return; }
2791 if(!
g_ctf) {
delete(
this);
return; }
2809 if(!
g_ctf) {
delete(
this);
return; }
2810 if(!
cvar(
"g_ctf_oneflag")) {
delete(
this);
return; }
2823 if(!
g_ctf) {
delete(
this);
return; }
2829spawnfunc(team_CTF_redflag) { spawnfunc_item_flag_team1(
this); }
2830spawnfunc(team_CTF_blueflag) { spawnfunc_item_flag_team2(
this); }
2832spawnfunc(team_CTF_redplayer) { spawnfunc_info_player_team1(
this); }
2833spawnfunc(team_CTF_redspawn) { spawnfunc_info_player_team1(
this); }
2835spawnfunc(team_CTF_blueplayer) { spawnfunc_info_player_team2(
this); }
2836spawnfunc(team_CTF_bluespawn) { spawnfunc_info_player_team2(
this); }
2838spawnfunc(team_CTF_neutralflag) { spawnfunc_item_flag_neutral(
this); }
2839spawnfunc(team_neutralobelisk) { spawnfunc_item_flag_neutral(
this); }
2842spawnfunc(team_redplayer) { spawnfunc_info_player_team1(
this); }
2843spawnfunc(team_blueplayer) { spawnfunc_info_player_team2(
this); }
2844spawnfunc(team_ctl_redlolly) { spawnfunc_item_flag_team1(
this); }
2845spawnfunc(team_CTL_redlolly) { spawnfunc_item_flag_team1(
this); }
2846spawnfunc(team_ctl_bluelolly) { spawnfunc_item_flag_team2(
this); }
2847spawnfunc(team_CTL_bluelolly) { spawnfunc_item_flag_team2(
this); }
2861 field(SP_CTF_PICKUPS,
"pickups", 0);
2862 field(SP_CTF_FCKILLS,
"fckills", 0);
2863 field(SP_CTF_RETURNS,
"returns", 0);
2873 this.
cnt = teamcolor - 1;
2875 this.
team = teamcolor;
2911 LOG_TRACE(
"No \"ctf_team\" entities found on this map, creating them anyway.");
void navigation_goalrating_start(entity this)
void navigation_goalrating_timeout_force(entity this)
float havocbot_symmetry_axis_q
void navigation_goalrating_timeout_set(entity this)
float havocbot_symmetry_axis_m
vector havocbot_middlepoint
bool navigation_goalrating_timeout(entity this)
void navigation_dynamicgoal_init(entity this, bool initially_static)
float goalentity_lock_timeout
float havocbot_symmetry_origin_order
void navigation_routerating(entity this, entity e, float f, float rangebias)
void navigation_dynamicgoal_set(entity this, entity dropper)
void navigation_goalrating_timeout_expire(entity this, float seconds)
void navigation_goalrating_end(entity this)
float havocbot_role_timeout
void waypoint_spawnforitem_force(entity e, vector org)
void navigation_dynamicgoal_unset(entity this)
float havocbot_middlepoint_radius
#define MUTATOR_HOOKFUNCTION(...)
#define MUTATOR_RETURNVALUE
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
void TakeResource(entity receiver, Resource res_type, float amount)
Takes an entity some resource.
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
#define colormapPaletteColor(c, isPants)
#define setmodel(this, m)
const int SFL_LOWER_IS_BETTER
Lower scores are better (e.g.
const int SFL_TIME
Display as mm:ss.s, value is stored as 10ths of a second (AND 0 is the worst possible value!...
const int SFL_SORT_PRIO_SECONDARY
Scoring priority (NOTE: PRIMARY is used for fraglimit) NOTE: SFL_SORT_PRIO_SECONDARY value must be lo...
const int SFL_SORT_PRIO_PRIMARY
#define autocvar_timelimit
bool autocvar_g_ctf_leaderboard
vector healtharmor_maxdamage(float h, float a, float armorblock, int deathtype)
const int INITPRIO_SETLOCATION
const int INITPRIO_GAMETYPE
const float MOVE_NOMONSTERS
float trace_dphitcontents
const float SOLID_TRIGGER
const float CONTENT_WATER
const float EF_FULLBRIGHT
float DPCONTENTS_PLAYERCLIP
float checkpvs(vector viewpos, entity viewee)
float DPCONTENTS_MONSTERCLIP
const float CONTENT_EMPTY
const int CTF_PINK_FLAG_CARRYING
const int CTF_YELLOW_FLAG_TAKEN
const int CTF_YELLOW_FLAG_CARRYING
const int CTF_PINK_FLAG_TAKEN
const int CTF_RED_FLAG_LOST
const int CTF_NEUTRAL_FLAG_LOST
const int CTF_YELLOW_FLAG_LOST
const int CTF_RED_FLAG_CARRYING
const int CTF_RED_FLAG_TAKEN
const int CTF_FLAG_NEUTRAL
const int CTF_BLUE_FLAG_LOST
const int CTF_BLUE_FLAG_TAKEN
const int CTF_PINK_FLAG_LOST
const int CTF_NEUTRAL_FLAG_CARRYING
const int CTF_BLUE_FLAG_CARRYING
const int CTF_NEUTRAL_FLAG_TAKEN
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
float autocvar_g_balance_armor_blockpercent
IntrusiveList g_damagedbycontents
entity EFFECT_CAP(int teamid)
entity EFFECT_PASS(int teamid)
entity EFFECT_FLAG_TOUCH(int teamid)
void Send_Effect_(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt)
const float FLOAT_EPSILON
void GameLogEcho(string s)
bool autocvar_sv_eventlog
ERASEABLE void IL_REMOVE(IntrusiveList this, entity it)
Remove any element, anywhere in the list.
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
ERASEABLE bool IL_CONTAINS(IntrusiveList this, entity it)
#define IL_EACH(this, cond, body)
#define SV_ParseClientCommand
entity WarpZone_FindRadius(vector org, float rad, bool needlineofsight)
void WarpZone_TraceLine(vector org, vector end, float nomonsters, entity forent)
void WarpZone_TrailParticles(entity own, float eff, vector org, vector end)
vector WarpZone_UnTransformOrigin(entity wz, vector v)
void WarpZone_RefSys_AddInverse(entity me, entity wz)
vector WarpZone_RefSys_TransformOrigin(entity from, entity to, vector org)
void WarpZone_RefSys_Copy(entity me, entity from)
#define BITSET_ASSIGN(a, b)
ERASEABLE string db_get(int db, string key)
ERASEABLE void db_put(int db, string key, string value)
bool MapInfo_Get_ByID(int i)
string MapInfo_Map_bspname
void modeleffect_spawn(string m, float s, float f, vector o, vector v, vector ang, vector angv, float s0, float s2, float a, float t1, float t2)
void set_movetype(entity this, int mt)
const int MOVETYPE_NOCLIP
@ STATUSEFFECT_REMOVE_CLEAR
Effect is being forcibly removed without calling any additional mechanics.
spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2 f1points f2
spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2 f1points s1 s2
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
void Send_Notification(NOTIF broadcast, entity client, MSG net_type, Notification net_name,...count)
#define APP_NUM(num, prefix)
#define APP_TEAM_NUM(num, prefix)
#define new_pure(class)
purely logical entities (not linked to the area grid)
#define METHOD(cname, name, prototype)
void copyentity_qc(entity src, entity dst)
#define crandom()
Returns a random number between -1.0 and 1.0.
float TeamScore_AddToTeam(int t, float scorefield, float score)
Adds a score to the given team.
void GetPressedKeys(entity this)
void PlayerUseKey(entity this)
#define IS_INDEPENDENT_PLAYER(e)
void ImpulseCommands(entity this)
#define ITEM_TOUCH_NEEDKILL()
#define ITEM_DAMAGE_NEEDKILL(dt)
void race_SendAll(entity player, bool only_rankings)
void write_recordmarker(entity pl, float tstart, float dt)
void race_checkAndWriteName(entity player)
void race_setTime(string map, float t, string myuid, string mynetname, entity e, bool showmessage)
#define _sound(e, c, s, v, a)
ClientState CS(Client this)
void StatusEffects_removeall(entity actor, int removal_type)
bool StatusEffects_active(StatusEffect this, entity actor)
ERASEABLE string ftos_decimals(float number, int decimals)
converts a number to a string with the indicated number of decimals
bool autocvar_g_ctf_flag_dropped_waypoint
void ctf_CalculatePassVelocity(entity flag, vector to, vector from, float turnrate)
void ctf_SpawnTeam(string teamname, int teamcolor)
entity havocbot_ctf_find_enemy_flag(entity bot)
bool autocvar_g_ctf_oneflag_reverse
float autocvar_g_ctf_throw_velocity_forward
float autocvar_g_ctf_flagcarrier_forcefactor
bool autocvar_g_ctf_flag_glowtrails
int autocvar_g_ctf_shield_min_negscore
void ctf_RespawnFlag(entity flag)
int havocbot_ctf_teamcount(entity bot, vector org, float tc_radius)
void ctf_CaptureShield_Update(entity player, bool wanted_status)
void ctf_Handle_Capture(entity flag, entity toucher, int capturetype)
void ctf_EventLog(string mode, int flagteam, entity actor)
void ctf_CaptureShield_Spawn(entity flag)
float autocvar_g_ctf_pass_arc_max
float autocvar_g_ctf_pass_timelimit
void havocbot_role_ctf_middle(entity this)
int autocvar_g_ctf_score_pickup_dropped_late
bool autocvar_g_ctf_flag_return_when_unreachable
void ctf_FlagSetup(int teamnum, entity flag)
void ctf_CheckFlagReturn(entity flag, int returntype)
void ctf_Handle_Drop(entity flag, entity player, int droptype)
float autocvar_g_ctf_stalemate_time
float autocvar_g_ctf_pass_radius
void havocbot_ctf_calculate_middlepoint()
float autocvar_g_ctf_pass_turnrate
bool autocvar_g_ctf_ignore_frags
int autocvar_g_ctf_throw_punish_count
bool autocvar_g_ctf_fullbrightflags
int autocvar_g_ctf_score_pickup_dropped_early
float autocvar_g_ctf_dropped_capture_delay
bool autocvar_g_ctf_score_ignore_fields
bool autocvar_g_ctf_portalteleport
bool autocvar_g_ctf_allow_vehicle_carry
int autocvar_g_ctf_score_return
bool autocvar_g_ctf_flag_return_carrying
float autocvar_g_ctf_flag_return_damage_delay
float autocvar_g_ctf_throw_punish_time
bool havocbot_ctf_is_basewaypoint(entity item)
float autocvar_g_ctf_flag_waypoint_maxdistance
void havocbot_goalrating_ctf_ourstolenflag(entity this, float ratingscale)
int autocvar_g_ctf_score_capture
float autocvar_g_ctf_throw_velocity_up
float autocvar_g_ctf_flagcarrier_damagefactor
float autocvar_g_ctf_shield_max_ratio
void ctf_FlagcarrierWaypoints(entity player)
void nades_GiveBonus(entity player, float score)
void havocbot_role_ctf_carrier(entity this)
void ctf_FlagDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
float autocvar_g_ctf_pass_directional_min
void havocbot_role_ctf_escort(entity this)
float autocvar_g_ctf_flag_damageforcescale
float autocvar_g_ctf_pass_wait
bool ctf_Stalemate_Customize(entity this, entity client)
float autocvar_g_ctf_flagcarrier_selfdamagefactor
void ctf_Handle_Return(entity flag, entity player)
int autocvar_g_ctf_stalemate_endcondition
entity havocbot_ctf_find_flag(entity bot)
void havocbot_role_ctf_offense(entity this)
float autocvar_g_ctf_shield_force
float autocvar_g_ctf_drop_velocity_up
bool ctf_CheckPassDirection(vector head_center, vector passer_center, vector passer_angle, vector nearest_to_passer)
float autocvar_g_ctf_flag_return_damage
void ctf_FlagThink(entity this)
bool ctf_CaptureShield_Customize(entity this, entity client)
int autocvar_g_ctf_score_penalty_drop
void havocbot_goalrating_ctf_droppedflags(entity this, float ratingscale, vector org, float df_radius)
float autocvar_g_ctf_flagcarrier_auto_helpme_damage
float autocvar_g_ctf_flag_return_time
bool ctf_Immediate_Return_Allowed(entity flag, entity toucher)
int autocvar_g_ctf_score_penalty_returned
void ctf_FakeTimeLimit(entity e, float t)
float autocvar_g_ctf_flagcarrier_selfforcefactor
float autocvar_g_ctf_throw_strengthmultiplier
bool autocvar_g_ctf_flag_dropped_floatinwater
float autocvar_g_ctf_throw_angle_min
void ctf_CaptureShield_Touch(entity this, entity toucher)
void ctf_RemovePlayer(entity player)
void havocbot_role_ctf_defense(entity this)
bool autocvar_g_ctf_flag_waypoint
float autocvar_g_ctf_flag_return_dropped
float autocvar_g_ctf_drop_velocity_side
int autocvar_g_ctf_score_kill
void havocbot_role_ctf_retriever(entity this)
int autocvar_g_ctf_score_pickup_base
float autocvar_g_ctf_flag_health
float autocvar_g_ctf_flag_return_carried_radius
float autocvar_g_ctf_flag_collect_delay
float autocvar_g_ctf_pass_velocity
bool autocvar_g_ctf_pass_request
void ctf_CaptureRecord(entity flag, entity player)
bool ctf_CaptureShield_CheckStatus(entity p)
bool autocvar_g_ctf_allow_monster_touch
bool autocvar_g_ctf_stalemate
bool autocvar_g_ctf_throw
bool autocvar_g_ctf_dynamiclights
void havocbot_role_ctf_setrole(entity bot, int role)
void ctf_Handle_Throw(entity player, entity receiver, int droptype)
float autocvar_g_ctf_pass_arc
void ctf_DelayedFlagSetup(entity this)
bool ctf_FlagBase_Customize(entity this, entity client)
void havocbot_goalrating_ctf_ourbase(entity this, float ratingscale)
void superspec_msg(string _center_title, string _con_title, entity _to, string _msg, float _spamlevel)
void havocbot_goalrating_ctf_enemybase(entity this, float ratingscale)
void ctf_CheckStalemate()
int autocvar_g_ctf_score_capture_assist
bool autocvar_g_ctf_flag_stay
bool autocvar_g_ctf_allow_vehicle_touch
void ctf_Handle_Pickup(entity flag, entity player, int pickuptype)
void ctf_ScoreRules(int teams)
float autocvar_g_ctf_throw_angle_max
bool ctf_Return_Customize(entity this, entity client)
float autocvar_g_ctf_throw_punish_delay
void ctf_Handle_Retrieve(entity flag, entity player)
void ctf_DelayedInit(entity this)
float autocvar_g_ctf_dropped_capture_radius
float autocvar_g_ctf_pass_directional_max
void havocbot_goalrating_ctf_enemyflag(entity this, float ratingscale)
bool superspec_Spectate(entity this, entity targ)
bool autocvar_g_ctf_flag_return
bool autocvar_g_ctf_reverse
void ctf_Reset(entity this)
void havocbot_ctf_reset_role(entity this)
float autocvar_g_ctf_flagcarrier_auto_helpme_time
const int HAVOCBOT_CTF_ROLE_RETRIEVER
float ctf_captureshield_min_negscore
float wpforenemy_nextthink
entity wps_enemyflagcarrier
const int FLAG_FLOAT_OFFSET_Z
const int CAPTURE_DROPPED
const float FLAG_TOUCHRATE
const vector FLAG_WAYPOINT_OFFSET
const vector VEHICLE_FLAG_OFFSET
const int HAVOCBOT_CTF_ROLE_DEFENSE
#define snd_flag_returned
const int HAVOCBOT_CTF_ROLE_MIDDLE
void ctf_FlagTouch(entity this, entity toucher)
#define CTF_SAMETEAM(a, b)
bool havocbot_cantfindflag
const float WPFE_THINKRATE
#define WPCOLOR_FLAGCARRIER(t)
#define FLAG_SPAWN_OFFSET
float ctf_captureshield_force
const int HAVOCBOT_CTF_ROLE_ESCORT
bool ctf_flagdamaged_byworld
const float FLAG_THINKRATE
const int HAVOCBOT_CTF_ROLE_OFFENSE
const int RETURN_SPEEDRUN
bool wpforenemy_announced
const int RETURN_NEEDKILL
const float VEHICLE_FLAG_SCALE
#define WPCOLOR_ENEMYFC(t)
const vector FLAG_CARRY_OFFSET
#define CTF_DIFFTEAM(a, b)
const int HAVOCBOT_CTF_ROLE_CARRIER
#define WPCOLOR_DROPPEDFLAG(t)
const vector FLAG_DROP_OFFSET
const int FLAG_PASS_ARC_OFFSET_Z
float ctf_captureshield_max_ratio
int autocvar_g_nades_bonus_score_high
int autocvar_g_nades_bonus_score_minor
int autocvar_g_nades_bonus_score_medium
void havocbot_goalrating_items(entity this, float ratingscale, vector org, float sradius)
void havocbot_goalrating_enemyplayers(entity this, float ratingscale, vector org, float sradius)
#define GameRules_scoring_vip(player, value)
#define GameRules_scoring_add(client, fld, value)
#define GameRules_scoring_add_team(client, fld, value)
#define GameRules_scoring(teams, spprio, stprio, fields)
entity TeamBalance_CheckAllowedTeams(entity for_whom)
Checks whether the player can join teams according to global configuration and mutator settings.
#define Static_Team_ColorName_Lower(teamid)
vector Team_ColorRGB(int teamid)
#define Team_ColorName_Upper(teamid)
int Team_IndexToTeam(int index)
Converts team index into team value.
string Team_ColorCode(int teamid)
const int TELEPORT_NORMAL
vector W_CalculateProjectileVelocity(entity actor, vector pvelocity, vector mvelocity, float forceAbsolute)
#define IS_REAL_CLIENT(v)
#define FOREACH_CLIENT(cond, body)
#define CENTER_OR_VIEWOFS(ent)
#define IS_BOT_CLIENT(v)
want: (IS_CLIENT(v) && !IS_REAL_CLIENT(v))
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
ERASEABLE vector vrint(vector v)
void WaypointSprite_HelpMePing(entity e)
void WaypointSprite_Kill(entity wp)
void WaypointSprite_UpdateTeamRadar(entity e, entity icon, vector col)
void WaypointSprite_UpdateMaxHealth(entity e, float f)
void WaypointSprite_Ping(entity e)
entity WaypointSprite_Spawn(entity spr, float _lifetime, float maxdistance, entity ref, vector ofs, entity showto, float t, entity own,.entity ownfield, float hideable, entity icon)
entity WaypointSprite_getviewentity(entity e)
void WaypointSprite_UpdateHealth(entity e, float f)
entity WaypointSprite_SpawnFixed(entity spr, vector ofs, entity own,.entity ownfield, entity icon)
float waypointsprite_limitedrange
float waypointsprite_deployed_lifetime
void DropToFloor_QC_DelayedInit(entity this)
void InitializeEntity(entity e, void(entity this) func, int order)
IntrusiveList g_moveables