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);
118 bool valid_record = (cap_time > 0.01);
125 else if(cap_time < cap_record)
162 WaypointSprite_Spawn(WP_FlagCarrier, 0, 0, player,
FLAG_WAYPOINT_OFFSET,
NULL, player.team, player,
wps_flagcarrier,
true, RADARICON_FLAG);
167 if(player.flagcarried &&
CTF_SAMETEAM(player, player.flagcarried))
169 if(!player.wps_enemyflagcarrier)
171 entity base_wp = WP_FlagCarrier;
176 case NUM_TEAM_1: base_wp = WP_FlagCarrierEnemyRed;
break;
177 case NUM_TEAM_2: base_wp = WP_FlagCarrierEnemyBlue;
break;
178 case NUM_TEAM_3: base_wp = WP_FlagCarrierEnemyYellow;
break;
179 case NUM_TEAM_4: base_wp = WP_FlagCarrierEnemyPink;
break;
180 default: base_wp = WP_FlagCarrierEnemyNeutral;
break;
192 if(!player.wps_flagreturn)
195 owp.colormod =
'0 0.8 0.8';
204 float current_distance =
vlen(((
'1 0 0' * to.x) + (
'0 1 0' * to.y)) - ((
'1 0 0' * from.x) + (
'0 1 0' * from.y)));
206 float current_height = (initial_height *
min(1, (current_distance / flag.pass_distance)));
212 targpos = (to + (
'0 0 1' * current_height));
224 else { targpos = to; }
245 h =
vlen(head_center - passer_center);
249 float distance_from_line =
vlen(nearest_to_passer - nearest_on_line);
259 else {
return true; }
269 int s,
s2, s3, s4, se, se2, se3, se4, sr, ser;
270 int players_worseeq, players_total;
280 sr = ((s -
s2) + (s3 + s4));
285 players_total = players_worseeq = 0;
294 ser = ((se - se2) + (se3 + se4));
313 if((wanted_status == player.ctf_captureshielded) && (updated_status != wanted_status))
315 Send_Notification(NOTIF_ONE, player, MSG_CENTER, ((updated_status) ? CENTER_CTF_CAPTURESHIELD_SHIELDED : CENTER_CTF_CAPTURESHIELD_FREE));
316 player.ctf_captureshielded = updated_status;
322 if(!client.ctf_captureshielded) {
return false; }
330 if(!
toucher.ctf_captureshielded) {
return; }
342 entity shield =
new(ctf_captureshield);
345 shield.team = flag.team;
351 shield.avelocity =
'7 0 11';
354 setorigin(shield, flag.origin);
356 setsize(shield, shield.scale * shield.mins, shield.scale * shield.maxs);
367 player = (player ? player : flag.pass_sender);
372 flag.angles =
'0 0 0';
377 flag.ctf_droptime =
time;
378 flag.ctf_landtime = 0;
379 flag.ctf_dropper = player;
383 if(flag.damagedbycontents)
400 case NUM_TEAM_1: base_wp = WP_FlagDroppedRed;
break;
401 case NUM_TEAM_2: base_wp = WP_FlagDroppedBlue;
break;
402 case NUM_TEAM_3: base_wp = WP_FlagDroppedYellow;
break;
403 case NUM_TEAM_4: base_wp = WP_FlagDroppedPink;
break;
404 default: base_wp = WP_FlagDroppedNeutral;
break;
422 flag.pass_distance = 0;
423 flag.pass_sender =
NULL;
424 flag.pass_target =
NULL;
430 entity sender = flag.pass_sender;
434 flag.owner.flagcarried = flag;
441 setattachment(flag, player.vehicle,
"");
447 setattachment(flag, player,
"");
452 flag.angles =
'0 0 0';
462 else if(it == player)
465 Send_Notification(NOTIF_ONE, it, MSG_CENTER,
APP_NUM(flag.team, CENTER_CTF_PASS_OTHER), sender.netname, player.netname);
472 player.throw_antispam = sender.throw_antispam;
474 flag.pass_distance = 0;
475 flag.pass_sender =
NULL;
476 flag.pass_target =
NULL;
481 entity flag = player.flagcarried;
482 vector targ_origin, flag_velocity;
484 if(!flag) {
return; }
485 if((droptype ==
DROP_PASS) && !receiver) {
return; }
487 if(flag.speedrunning || flag.classname ==
"phantomflag")
492 if(player.wps_enemyflagcarrier)
495 if(player.wps_flagreturn)
502 setattachment(flag,
NULL,
"");
503 tracebox(player.origin +
vec3(0, 0, player.mins.z - flag.m_mins.z),
512 setsize(flag, player.mins, player.maxs);
514 flag.owner.flagcarried =
NULL;
517 flag.ctf_dropper = player;
518 flag.ctf_droptime =
time;
519 flag.ctf_landtime = 0;
534 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)));
540 flag.pass_sender = player;
541 flag.pass_target = receiver;
564 flag.velocity =
'0 0 0';
582 if(player.wps_enemyflagcarrier)
585 if(player.wps_flagreturn)
593void shockwave_spawn(
string m,
vector org,
float sz,
float t1,
float t2)
595 return modeleffect_spawn(m, 0, 0,
org,
'0 0 0',
'0 0 0',
'0 0 0', 0, sz, 1, t1, t2);
610 float old_time, new_time;
612 if(!player) {
return; }
614 if((flag.cnt || enemy_flag.cnt) && flag.cnt != enemy_flag.cnt) {
return; }
616 if (
toucher.goalentity == flag.bot_basewaypoint)
617 toucher.goalentity_lock_timeout = 0;
623 player_team_flag = it;
630 player.throw_prevtime =
time;
631 player.throw_count = 0;
647 if(enemy_flag.score_capture || flag.score_capture)
648 pscore =
floor((
max(1, enemy_flag.score_capture) +
max(1, flag.score_capture)) * 0.5);
651 if(enemy_flag.score_team_capture || flag.score_team_capture)
652 capscore =
floor((
max(1, enemy_flag.score_team_capture) +
max(1, flag.score_team_capture)) * 0.5);
657 if(!old_time || new_time < old_time)
663 shockwave_spawn(
"models/ctf/shockwavetransring.md3", flag.origin -
'0 0 15', -0.8, 0, 1);
672 if((enemy_flag.ctf_dropper) && (player != enemy_flag.ctf_dropper))
717 if(player.flagcarried == flag)
729 float pickup_dropped_score;
735 newflag.classname =
"phantomflag";
745 player.flagcarried = flag;
750 setattachment(flag, player.vehicle,
"");
756 setattachment(flag, player,
"");
763 flag.angles =
'0 0 0';
766 flag.damagedbycontents =
false;
821 LOG_TRACE(
"pickup_dropped_score is ",
ftos(pickup_dropped_score));
833 flag.speedrunning = player.speedrunning;
839 Send_Effect_(flag.toucheffect, player.origin,
'0 0 0', 1);
856 if (flag.wps_flagdropped
906 int stale_flags = 0, stale_red_flags = 0, stale_blue_flags = 0, stale_yellow_flags = 0, stale_pink_flags = 0, stale_neutral_flags = 0;
916 it.ctf_staleflagnext = ctf_staleflaglist;
917 ctf_staleflaglist = it;
925 default: ++stale_neutral_flags;
break;
931 stale_flags = (stale_neutral_flags >= 1);
933 stale_flags = (stale_red_flags >= 1) + (stale_blue_flags >= 1) + (stale_yellow_flags >= 1) + (stale_pink_flags >= 1);
937 else if(stale_flags >= 2)
947 for(
entity tmp_entity = ctf_staleflaglist; tmp_entity; tmp_entity = tmp_entity.ctf_staleflagnext)
949 if((tmp_entity.owner) && (!tmp_entity.owner.wps_enemyflagcarrier))
951 entity base_wp = WP_FlagCarrier;
954 switch (tmp_entity.owner.team)
956 case NUM_TEAM_1: base_wp = WP_FlagCarrierEnemyRed;
break;
957 case NUM_TEAM_2: base_wp = WP_FlagCarrierEnemyBlue;
break;
958 case NUM_TEAM_3: base_wp = WP_FlagCarrierEnemyYellow;
break;
959 case NUM_TEAM_4: base_wp = WP_FlagCarrierEnemyPink;
break;
960 default: base_wp = WP_FlagCarrierEnemyNeutral;
break;
1081 CS(this.
owner).impulse = CHIMPULSE_SPEEDRUN.impulse;
1128 LOG_TRACE(
"ctf_FlagThink(): Flag exists with no status?");
1150 if(!flag.ctf_flagdamaged_byworld) {
return; }
1170 if(
time > flag.wait)
1172 Send_Effect_(flag.toucheffect, flag.origin,
'0 0 0', 1);
1180 switch(flag.ctf_status)
1188 else if(!flag.team && (!
toucher.flagcarried) && (!
toucher.ctf_captureshielded) && (
time >
toucher.next_take_time) && is_not_monster)
1214 LOG_TRACE(
"Someone touched a flag even though it was being carried?");
1226 else if(is_not_monster && (!
toucher.flagcarried))
1242 if((flag.owner) && (flag.owner.flagcarried == flag))
1248 flag.owner.flagcarried =
NULL;
1251 if(flag.speedrunning)
1255 if((flag.owner) && (flag.owner.vehicle))
1262 setattachment(flag,
NULL,
"");
1264 setorigin(flag, flag.ctf_spawnorigin);
1270 flag.velocity =
'0 0 0';
1271 flag.angles = flag.mangle;
1274 flag.damagedbycontents =
false;
1282 flag.pass_distance = 0;
1283 flag.pass_sender =
NULL;
1284 flag.pass_target =
NULL;
1285 flag.ctf_dropper =
NULL;
1286 flag.ctf_pickuptime = 0;
1287 flag.ctf_droptime = 0;
1288 flag.ctf_landtime = 0;
1289 flag.ctf_flagdamaged_byworld =
false;
1294 if(flag.classname ==
"phantomflag")
1311 entity flag = e.flagcarried;
1314 if(flag && (flag.cnt || wp_owner.cnt) && wp_owner.cnt != flag.cnt)
1329 case NUM_TEAM_1: basename = WP_FlagBaseRed;
break;
1330 case NUM_TEAM_2: basename = WP_FlagBaseBlue;
break;
1331 case NUM_TEAM_3: basename = WP_FlagBaseYellow;
break;
1332 case NUM_TEAM_4: basename = WP_FlagBasePink;
break;
1333 default: basename = WP_FlagBaseNeutral;
break;
1356 setattachment(flag,
NULL,
"");
1359 flag.team = teamnum;
1360 flag.classname =
"item_flag_team";
1361 flag.target =
"###item###";
1372 flag.pushable =
true;
1376 flag.damagedbycontents =
false;
1378 flag.velocity =
'0 0 0';
1379 flag.mangle = flag.angles;
1388 flag.colormap = (teamnum) ? (teamnum - 1) * 0x11 : 0x00;
1389 flag.colormap |=
BIT(10);
1393 flag.cnt = flag.score_assist = flag.score_team_capture = flag.score_capture = flag.score_drop = flag.score_pickup = flag.score_return = 0;
1398 if(flag.skin == 0) { flag.skin =
cvar(sprintf(
"g_ctf_flag_%s_skin", teamname)); }
1399 if(flag.model ==
"") { flag.model =
cvar_string(sprintf(
"g_ctf_flag_%s_model", teamname)); }
1400 if (flag.toucheffect ==
"") { flag.toucheffect =
EFFECT_FLAG_TOUCH(teamnum).eent_eff_name; }
1401 if (flag.passeffect ==
"") { flag.passeffect =
EFFECT_PASS(teamnum).eent_eff_name; }
1402 if (flag.capeffect ==
"") { flag.capeffect =
EFFECT_CAP(teamnum).eent_eff_name; }
1406 if(flag.s == "") flag.s = b; \
1407 precache_sound(flag.s);
1419 precache_model(flag.model);
1422 _setmodel(flag, flag.model);
1424 flag.m_mins = flag.mins;
1425 flag.m_maxs = flag.maxs;
1432 case NUM_TEAM_1: flag.glow_color = 251;
break;
1433 case NUM_TEAM_2: flag.glow_color = 210;
break;
1434 case NUM_TEAM_3: flag.glow_color = 110;
break;
1435 case NUM_TEAM_4: flag.glow_color = 145;
break;
1436 default: flag.glow_color = 254;
break;
1438 flag.glow_size = 25;
1439 flag.glow_trail = 1;
1457 if((flag.spawnflags & 1) || flag.noalign)
1459 flag.dropped_origin = flag.origin;
1460 flag.noalign =
true;
1465 flag.noalign =
false;
1491 if(!f1 && it.team == NUM_TEAM_1)
1493 else if(!f2 && it.team == NUM_TEAM_2)
1542 else if(!bot.flagcarried)
1563 if(
vdist(it.origin -
org, <, tc_radius))
1572void havocbot_goalrating_ctf_ourflag(
entity this,
float ratingscale)
1574 entity 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;
1684 if(it.tag_entity==
NULL)
1688 if(
vdist(
org - it.origin, <, df_radius))
1699 float cdefense, cmiddle, coffense;
1747 else if (
count == 2)
1764 if(cdefense<=coffense)
1766 else if(coffense<=cmiddle)
1778 if (item.classname !=
"waypoint")
1808 vector base_org = mf.dropped_origin;
1809 float base_rating = (mf.ctf_status ==
FLAG_BASE) ? 10000 : (
vdist(this.
origin - base_org, >, 100) ? 2000 : 1000);
1835 Damage(
this,
this,
this, 100000, DEATH_KILL.m_id,
DMG_NOWEP,
this.origin,
'0 0 0');
1861 this.havocbot_role = this.havocbot_previous_role;
1873 if (mf.ctf_status !=
FLAG_BASE &&
vdist(ef.origin - mf.dropped_origin, <, 900))
1888 this.havocbot_role = this.havocbot_previous_role;
1934 pos = mf.tag_entity.origin;
1950 pos = ef.tag_entity.origin;
1954 if(
vdist(pos - mf.dropped_origin, >, 700))
2007 if (mf.enemy ==
this)
2024 const float RT_RADIUS = 10000;
2033 vector enemy_base_org = ef.dropped_origin;
2142 float distance, bestdistance = 10000;
2144 distance =
vlen(
org - it.origin);
2145 if(distance<bestdistance)
2148 bestdistance = distance;
2173 string s =
"(null)";
2179 bot.havocbot_role_timeout = 0;
2180 bot.havocbot_cantfindflag =
time + 10;
2181 if (bot.havocbot_previous_role != bot.havocbot_role)
2187 bot.havocbot_role_timeout = 0;
2192 bot.havocbot_role_timeout = 0;
2197 bot.havocbot_role_timeout = 0;
2201 bot.havocbot_previous_role = bot.havocbot_role;
2203 bot.havocbot_role_timeout =
time + 10;
2204 if (bot.havocbot_previous_role != bot.havocbot_role)
2209 bot.havocbot_previous_role = bot.havocbot_role;
2211 bot.havocbot_role_timeout =
time + 30;
2212 if (bot.havocbot_previous_role != bot.havocbot_role)
2216 LOG_TRACE(bot.netname,
" switched to ", s);
2248 STAT(OBJECTIVE_STATUS, player) |= CTF_FLAG_NEUTRAL;
2252 if(it.owner == player || it.pass_sender == player)
2254 else if(it.ctf_status == FLAG_DROPPED)
2256 else if(it.ctf_status != FLAG_BASE)
2259 if(!bestflag || prio > bestprio)
2268 int t = 0, t2 = 0, t3 = 0;
2269 switch(bestflag.team)
2278 switch(bestflag.ctf_status)
2283 if((bestflag.owner == player) || (bestflag.pass_sender == player))
2284 STAT(OBJECTIVE_STATUS, player) |= t;
2286 STAT(OBJECTIVE_STATUS, player) |= t2;
2291 STAT(OBJECTIVE_STATUS, player) |= t3;
2299 if(player.ctf_captureshielded)
2308 if(player.wps_flagcarrier)
2319 if(frag_attacker.flagcarried)
2362 tmp_entity.ctf_dropper =
NULL;
2374 if(player.flagcarried)
2379 if(it.pass_sender == player) { it.pass_sender =
NULL; }
2380 if(it.pass_target == player) { it.pass_target =
NULL; }
2381 if(it.ctf_dropper == player) { it.ctf_dropper =
NULL; }
2423 if(player.flagcarried)
2445 if(head != player &&
SAME_TEAM(head, player))
2446 if(!head.speedrunning && !head.vehicle)
2458 Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname);
2463 Send_Notification(NOTIF_ONE, head, MSG_CENTER, CENTER_CTF_PASS_REQUESTED, player.netname);
2464 Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname);
2469 else if(player.flagcarried && !head.flagcarried)
2474 if(
vlen2(passer_center - head_center) <
vlen2(passer_center - closest_target_center))
2475 { closest_target = head; }
2477 else { closest_target = head; }
2490 if(player.throw_count == -1)
2494 player.throw_prevtime =
time;
2495 player.throw_count = 1;
2508 else { ++player.throw_count; }
2511 player.throw_prevtime =
time;
2523 if(player.wps_flagcarrier)
2525 player.wps_helpme_time =
time;
2530 WaypointSprite_Spawn(WP_Helpme,
waypointsprite_deployed_lifetime,
waypointsprite_limitedrange, player,
FLAG_WAYPOINT_OFFSET,
NULL, player.team, player,
wps_helpme,
false, RADARICON_HELPME);
2542 if(player.flagcarried)
2550 player.flagcarried.nodrawtoclient = player;
2551 setattachment(player.flagcarried, veh,
"");
2564 if(player.flagcarried)
2566 setattachment(player.flagcarried, player,
"");
2569 player.flagcarried.angles =
'0 0 0';
2570 player.flagcarried.nodrawtoclient =
NULL;
2579 if(player.flagcarried)
2591 switch(it.ctf_status)
2600 it.nextthink =
false;
2627 int record_page =
M_ARGV(0,
int);
2628 string ret_string =
M_ARGV(1,
string);
2630 for(
int i = record_page * 200; i <
MapInfo_count && i < record_page * 200 + 200; ++i)
2645 M_ARGV(1,
string) = ret_string;
2649void superspec_msg(
string _center_title,
string _con_title,
entity _to,
string _msg,
float _spamlevel);
2678 if(it.flagcarried && (it.team == _team || _team == 0))
2681 if(_team == 0 &&
IS_SPEC(player) && player.enemy == it)
2688 superspec_msg(
"",
"", player,
"No active flag carrier\n", 1);
2704 if(player.flagcarried)
2731 if(!
g_ctf) {
delete(
this);
return; }
2749 if(!
g_ctf) {
delete(
this);
return; }
2767 if(!
g_ctf) {
delete(
this);
return; }
2785 if(!
g_ctf) {
delete(
this);
return; }
2803 if(!
g_ctf) {
delete(
this);
return; }
2804 if(!
cvar(
"g_ctf_oneflag")) {
delete(
this);
return; }
2817 if(!
g_ctf) {
delete(
this);
return; }
2823spawnfunc(team_CTF_redflag) { spawnfunc_item_flag_team1(
this); }
2824spawnfunc(team_CTF_blueflag) { spawnfunc_item_flag_team2(
this); }
2826spawnfunc(team_CTF_redplayer) { spawnfunc_info_player_team1(
this); }
2827spawnfunc(team_CTF_redspawn) { spawnfunc_info_player_team1(
this); }
2829spawnfunc(team_CTF_blueplayer) { spawnfunc_info_player_team2(
this); }
2830spawnfunc(team_CTF_bluespawn) { spawnfunc_info_player_team2(
this); }
2832spawnfunc(team_CTF_neutralflag) { spawnfunc_item_flag_neutral(
this); }
2833spawnfunc(team_neutralobelisk) { spawnfunc_item_flag_neutral(
this); }
2836spawnfunc(team_redplayer) { spawnfunc_info_player_team1(
this); }
2837spawnfunc(team_blueplayer) { spawnfunc_info_player_team2(
this); }
2838spawnfunc(team_ctl_redlolly) { spawnfunc_item_flag_team1(
this); }
2839spawnfunc(team_CTL_redlolly) { spawnfunc_item_flag_team1(
this); }
2840spawnfunc(team_ctl_bluelolly) { spawnfunc_item_flag_team2(
this); }
2841spawnfunc(team_CTL_bluelolly) { spawnfunc_item_flag_team2(
this); }
2855 field(SP_CTF_PICKUPS,
"pickups", 0);
2856 field(SP_CTF_FCKILLS,
"fckills", 0);
2857 field(SP_CTF_RETURNS,
"returns", 0);
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.
#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)
WriteByte(chan, ent.angles.y/DEC_FACTOR)
SetResourceExplicit(ent, RES_ARMOR, ReadByte() *DEC_FACTOR)) ENTCS_PROP(NAME
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 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.
#define AVAILABLE_TEAMS
Number of teams that exist currently.
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)
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)
int Team_MapEnts_FindOrSpawn(string ent_classname, int defaultmask)
Finds any team map entities and returns their bitmask, else spawns them.
int teamplay_bitmask
The set of currently available teams (AVAILABLE_TEAMS is the number of them).
#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