47 WriteHeader(MSG_ENTITY, ENT_ONSCAMERA);
49 WriteVector(MSG_ENTITY, this.
origin);
51 WriteAngleVector(MSG_ENTITY, this.
angles);
58 entity e = WaypointSprite_getviewentity(client);
73 vector theirmid = (toucher.absmin + toucher.absmax) * 0.5;
79 play2(toucher,
SND(ONS_DAMAGEBLOCKEDBYSHIELD));
81 if(this.
enemy.classname ==
"onslaught_generator")
82 Send_Notification(NOTIF_ONE, toucher, MSG_CENTER, CENTER_ONS_GENERATOR_SHIELDED);
84 Send_Notification(NOTIF_ONE, toucher, MSG_CENTER, CENTER_ONS_CONTROLPOINT_SHIELDED);
96 entity shield =
new(ons_captureshield);
100 shield.team = this.
team;
108 shield.avelocity =
'7 0 11';
109 shield.scale = this.
scale;
111 float shield_extra_size = 1.20;
114 setsize(shield, shield_extra_size * this.
mins, shield_extra_size * this.
maxs);
134 l.islinked = l.iscaptured;
135 l.isshielded = l.iscaptured;
136 l.sprite.SendFlags |= 16;
143 l.aregensneighbor = 0;
144 l.arecpsneighbor = 0;
146 l.sprite.SendFlags |= 16;
157 if (l.enemy.iscaptured && l.goalentity.iscaptured)
158 if (l.enemy.islinked != l.goalentity.islinked)
161 if (!l.goalentity.islinked)
164 l.goalentity.islinked =
true;
165 LOG_DEBUG(
etos(l),
" (link) is marking ",
etos(l.goalentity),
" (point) because its team matches ",
etos(l.enemy),
" (point)");
167 else if (!l.enemy.islinked)
170 l.enemy.islinked =
true;
171 LOG_DEBUG(
etos(l),
" (link) is marking ",
etos(l.enemy),
" (point) because its team matches ",
etos(l.goalentity),
" (point)");
180 if (l.goalentity.islinked)
184 LOG_DEBUG(
etos(l),
" (link) is unshielding ",
etos(l.enemy),
" (point) because its team does not match ",
etos(l.goalentity),
" (point)");
185 l.enemy.isshielded =
false;
187 if(l.goalentity.classname ==
"onslaught_generator")
188 l.enemy.aregensneighbor |=
BIT(l.goalentity.team);
190 l.enemy.arecpsneighbor |=
BIT(l.goalentity.team);
192 if (l.enemy.islinked)
196 LOG_DEBUG(
etos(l),
" (link) is unshielding ",
etos(l.goalentity),
" (point) because its team does not match ",
etos(l.enemy),
" (point)");
197 l.goalentity.isshielded =
false;
199 if(l.enemy.classname ==
"onslaught_generator")
200 l.goalentity.aregensneighbor |=
BIT(l.enemy.team);
202 l.goalentity.arecpsneighbor |=
BIT(l.enemy.team);
214 l.bot_attack =
false;
236 if(l.goalentity.bot_attack)
238 l.goalentity.bot_attack =
false;
247 if(!l.goalentity.bot_attack)
249 l.goalentity.bot_attack =
true;
256 it.team = it.enemy.team;
257 it.colormap = it.enemy.colormap;
268 WriteHeader(MSG_ENTITY, ENT_CLIENT_RADARLINK);
272 WriteVector(MSG_ENTITY, this.
goalentity.origin);
276 WriteVector(MSG_ENTITY, this.
enemy.origin);
288 float cc = 0, cc1 = 0, cc2 = 0;
290 if(this.
goalentity.islinked ||
this.goalentity.iscaptured) { cc1 = (this.
goalentity.team - 1) * 0x01; }
291 if(this.
enemy.islinked ||
this.enemy.iscaptured) { cc2 = (this.
enemy.team - 1) * 0x10; }
309 if(!this.
enemy) {
objerror(
this,
"can not find target2\n"); }
324 if(cp.aregensneighbor &
BIT(teamnum))
return 2;
325 if(cp.arecpsneighbor &
BIT(teamnum))
return 1;
345 else if(cp.goalentity)
348 if(cp.team == teamnum)
379 if(damage <= 0) {
return; }
381 if (this.
owner.isshielded)
387 play2(attacker,
SND(ONS_DAMAGEBLOCKEDBYSHIELD));
389 attacker.typehitsound += 1;
398 play2team(this.
team,
SND(ONS_CONTROLPOINT_UNDERATTACK));
403 if(this.
owner.iscaptured)
420 if (this.
owner.message !=
"")
421 Send_Notification(NOTIF_ALL,
NULL, MSG_INFO,
APP_TEAM_NUM(this.
team, INFO_ONSLAUGHT_CPDESTROYED), this.
owner.message, attacker.netname);
423 Send_Notification(NOTIF_ALL,
NULL, MSG_INFO,
APP_TEAM_NUM(this.
team, INFO_ONSLAUGHT_CPDESTROYED_NONAME), attacker.netname);
429 this.
owner.islinked =
false;
430 this.
owner.iscaptured =
false;
432 this.
owner.colormap = 1024;
434 WaypointSprite_UpdateMaxHealth(this.
owner.sprite, 0);
442 if(this.
owner.model !=
"models/onslaught/controlpoint_pad.md3")
455 float true_limit = ((limit !=
RES_LIMIT_NONE) ? limit : targ.max_health);
456 if (hlth <= 0 || hlth >= true_limit)
461 if(targ.owner.iscaptured)
462 WaypointSprite_UpdateHealth(targ.owner.sprite, hlth);
464 WaypointSprite_UpdateBuildFinished(targ.owner.sprite,
time + (targ.max_health - hlth) / (targ.count /
ONS_CP_THINKRATE));
475 int _enemy_count = 0;
476 int _friendly_count = 0;
481 if(SAME_TEAM(it, this))
509 if(this.
owner.islinked !=
this.owner.waslinked)
512 int t = this.
owner.team;
513 if(!this.
owner.islinked)
526 Send_Effect(EFFECT_ELECTRIC_SPARKS, this.
origin +
randompos(
'-10 -10 -20',
'10 10 20'),
'0 0 0', 1);
556 this.
owner.iscaptured =
true;
559 Send_Effect(
EFFECT_CAP(this.
owner.team),
this.owner.origin,
'0 0 0', 1);
561 WaypointSprite_UpdateMaxHealth(this.
owner.sprite,
this.max_health);
566 if(this.
owner.message !=
"")
568 Send_Notification(NOTIF_ALL,
NULL, MSG_INFO, INFO_ONSLAUGHT_CAPTURE, this.
owner.ons_toucher.netname,
this.owner.message);
569 Send_Notification(NOTIF_ALL_EXCEPT, this.
owner.ons_toucher, MSG_CENTER,
APP_TEAM_NUM(this.
owner.ons_toucher.team, CENTER_ONS_CAPTURE_TEAM),
this.owner.message);
570 Send_Notification(NOTIF_ONE, this.
owner.ons_toucher, MSG_CENTER, CENTER_ONS_CAPTURE,
this.owner.message);
574 Send_Notification(NOTIF_ALL,
NULL, MSG_INFO, INFO_ONSLAUGHT_CAPTURE_NONAME, this.
owner.ons_toucher.netname);
575 Send_Notification(NOTIF_ALL_EXCEPT, this.
owner.ons_toucher, MSG_CENTER,
APP_TEAM_NUM(this.
owner.ons_toucher.team, CENTER_ONS_CAPTURE_TEAM_NONAME));
576 Send_Notification(NOTIF_ONE, this.
owner.ons_toucher, MSG_CENTER, CENTER_ONS_CAPTURE_NONAME);
591 if(this.
owner.model != MDL_ONS_CP_PAD2.model_str())
602 entity e =
new(onslaught_controlpoint_icon);
616 e.team = player.team;
617 e.colormap = 1024 + (e.team - 1) * 17;
624 cp.colormap = e.colormap;
630 cp.sprite.SendFlags |= 16;
641 if(a == -2) {
return WP_OnsCPDefend; }
642 if(a == -1 || a == 1 || a == 2) {
return WP_OnsCP; }
643 if(a == 3 || a == 4) {
return WP_OnsCPAttack; }
654 WaypointSprite_UpdateSprites(e.sprite, s1, s1, s1);
659 if(e.lastteam != e.team + 2 || e.lastshielded != sh || e.iscaptured != e.lastcaptured)
665 WaypointSprite_UpdateMaxHealth(e.sprite, 0);
669 WaypointSprite_UpdateMaxHealth(e.sprite, e.goalentity.max_health);
676 WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, 0.5 *
colormapPaletteColor(e.team - 1,
false));
678 WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT,
'0.5 0.5 0.5');
683 WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT,
colormapPaletteColor(e.team - 1,
false));
685 WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT,
'0.75 0.75 0.75');
687 WaypointSprite_Ping(e.sprite);
689 e.lastteam = e.team + 2;
691 e.lastcaptured = e.iscaptured;
703 toucher = toucher.owner;
707 if(STAT(FROZEN, toucher)) {
return; }
708 if(
IS_DEAD(toucher)) {
return; }
713 if(
time <= toucher.teleport_antispam)
714 Send_Notification(NOTIF_ONE, toucher, MSG_CENTER, CENTER_ONS_TELEPORT_ANTISPAM,
rint(toucher.teleport_antispam -
time));
716 Send_Notification(NOTIF_ONE, toucher, MSG_CENTER, CENTER_ONS_TELEPORT);
720 if(attackable != 2 && attackable != 4)
735 CSQCMODEL_AUTOUPDATE(
this);
754 WaypointSprite_UpdateMaxHealth(this.
sprite, 0);
761 CSQCMODEL_AUTOUPDATE(
this);
771 CSQCMODEL_AUTOINIT(
this);
780 cp.netname =
"Control point";
789 cp.iscaptured =
false;
791 cp.isshielded =
true;
797 if((cp.spawnflags & 1) || cp.noalign)
825 return WP_OnsGenShielded;
832 WaypointSprite_UpdateSprites(e.sprite, s1, s1, s1);
834 if(e.lastteam != e.team + 2 || e.lastshielded != e.isshielded)
836 e.lastteam = e.team + 2;
837 e.lastshielded = e.isshielded;
841 WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, 0.5 *
colormapPaletteColor(e.team - 1,
false));
843 WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR,
'0.5 0.5 0.5');
848 WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR,
colormapPaletteColor(e.team - 1,
false));
850 WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR,
'0.75 0.75 0.75');
852 WaypointSprite_Ping(e.sprite);
860 vector best_ang =
'0 0 0';
861 float best_trace_fraction = 0;
880 cam.angles = best_ang;
894 if(damage <= 0)
return;
898 if (attacker !=
this)
906 play2(attacker,
SND(ONS_DAMAGEBLOCKEDBYSHIELD));
907 attacker.typehitsound += 1;
916 play2team(this.
team,
SND(ONS_GENERATOR_UNDERATTACK));
921 WaypointSprite_UpdateHealth(this.
sprite, hlth);
931 if (attacker ==
this)
932 Send_Notification(NOTIF_ALL,
NULL, MSG_INFO,
APP_TEAM_NUM(this.
team, INFO_ONSLAUGHT_GENDESTROYED_OVERTIME));
935 Send_Notification(NOTIF_ALL,
NULL, MSG_INFO,
APP_TEAM_NUM(this.
team, INFO_ONSLAUGHT_GENDESTROYED));
949 WaypointSprite_UpdateMaxHealth(this.
sprite, 0);
950 WaypointSprite_Ping(this.
sprite);
966 Send_Effect(EFFECT_SPARKS, hitloc, force * -1, 1);
980 float true_limit = ((limit !=
RES_LIMIT_NONE) ? limit : targ.max_health);
982 if (hlth <= 0 || hlth >= true_limit)
987 WaypointSprite_UpdateHealth(targ.sprite, hlth);
988 targ.frame = 10 *
bound(0, (1 - hlth / targ.max_health), 1);
989 targ.lasthealth = hlth;
1006 Send_Notification(NOTIF_ONE, it, MSG_CENTER, CENTER_ONS_NOTSHIELDED_TEAM);
1011 Send_Notification(NOTIF_ONE, it, MSG_CENTER,
APP_TEAM_NUM(this.
team, CENTER_ONS_NOTSHIELDED));
1066 Send_Notification(NOTIF_ONE, toucher, MSG_CENTER, CENTER_ONS_TELEPORT);
1073 int teamnum = gen.team;
1081 gen.team_saved = teamnum;
1087 gen.bot_attack =
true;
1094 gen.iscaptured =
true;
1095 gen.islinked =
true;
1096 gen.isshielded =
true;
1103 gen.colormap = 1024 + (teamnum - 1) * 17;
1111 WaypointSprite_UpdateMaxHealth(gen.sprite, gen.max_health);
1155 Send_Notification(NOTIF_ALL,
NULL, MSG_CENTER, CENTER_OVERTIME_CONTROLPOINT);
1163 for(tmp_entity =
ons_worldgeneratorlist; tmp_entity; tmp_entity = tmp_entity.ons_worldgeneratornext)
if(
time >= tmp_entity.ons_overtime_damagedelay)
1177 d = d * tmp_entity.max_health;
1181 Damage(tmp_entity, tmp_entity, tmp_entity, d, DEATH_HURTTRIGGER.m_id,
DMG_NOWEP, tmp_entity.origin,
'0 0 0');
1183 tmp_entity.sprite.SendFlags |= 16;
1185 tmp_entity.ons_overtime_damagedelay =
time + 1;
1197 Send_Notification(NOTIF_ALL,
NULL, MSG_CENTER,
APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_WIN));
1198 Send_Notification(NOTIF_ALL,
NULL, MSG_INFO,
APP_TEAM_NUM(winner_team, INFO_ROUND_TEAM_WIN));
1201 else if(winner_team == -1)
1203 Send_Notification(NOTIF_ALL,
NULL, MSG_CENTER, CENTER_ROUND_TIED);
1204 Send_Notification(NOTIF_ALL,
NULL, MSG_INFO, INFO_ROUND_TIED);
1209 play2all(
SND(CTF_CAPTURE(winner_team)));
1214 STAT(ROUNDLOST, it) =
true;
1215 it.player_blocked =
true;
1220 game_stopped =
true;
1234 for(tmp_entity =
ons_worldcplist; tmp_entity; tmp_entity = tmp_entity.ons_worldcpnext)
1235 tmp_entity.sprite.SendFlags |= 16;
1238 tmp_entity.sprite.SendFlags |= 16;
1281 cp2.wpconsidered =
false;
1287 if(!((cp2.aregensneighbor &
BIT(this.
team)) || (cp2.arecpsneighbor &
BIT(this.
team))))
1295 if(it.havocbot_ons_target == cp2)
1301 cp2.wpconsidered =
true;
1309 if (!cp1.wpconsidered)
1312 if(cp1.wpcost<bestvalue)
1314 bestvalue = cp1.wpcost;
1332 for (radius = 500; radius <= 1000 && !found; radius += 500)
1336 if (!(it.wpflags & WAYPOINTFLAG_GENERATED) && checkpvs(it.origin, cp))
1339 if (it.cnt < bestvalue)
1391 if (checkpvs(it.origin, g))
1394 if (it.cnt < bestvalue)
1404 LOG_DEBUG(
"waypoints found around generator");
1417 LOG_DEBUG(
"generator found without waypoints around");
1496 if(max_dist <= 0 ||
vdist(cp.origin - pos, <=, max_dist))
1497 if(
vlen2(cp.origin - pos) <=
vlen2(closest_target.origin - pos) || closest_target ==
NULL)
1498 closest_target = cp;
1503 if(max_dist <= 0 ||
vdist(gen.origin - pos, <, max_dist))
1504 if(
vlen2(gen.origin - pos) <=
vlen2(closest_target.origin - pos) || closest_target ==
NULL)
1505 closest_target = gen;
1508 return closest_target;
1520 float smallest_distance = 0, distance;
1524 delta = cp.origin - pos;
1526 distance =
vlen(delta);
1530 if(max_dist <= 0 || distance <= max_dist)
1531 if(closest_target ==
NULL || distance <= smallest_distance )
1533 closest_target = cp;
1534 smallest_distance = distance;
1539 delta = gen.origin - pos;
1541 distance =
vlen(delta);
1544 if(max_dist <= 0 || distance <= max_dist)
1545 if(closest_target ==
NULL || distance <= smallest_distance )
1547 closest_target = gen;
1548 smallest_distance = distance;
1552 return closest_target;
1589 float iteration_scale = 1;
1590 for(i = 0; i < 16; ++i)
1592 iteration_scale -= i / 16;
1597 loc *=
random() * range * iteration_scale;
1599 loc += tele_target.origin +
'0 0 128' * iteration_scale;
1601 tracebox(loc, STAT(PL_MIN, player), STAT(PL_MAX, player), loc,
MOVE_NORMAL, player);
1609 Send_Effect(EFFECT_TELEPORT, player.origin,
'0 0 0', 1);
1613 player.angles =
'0 1 0' * ( theta *
RAD2DEG + 180 );
1615 player.fixangle =
true;
1618 player.v_angle = player.angles;
1624 Send_Effect(EFFECT_TELEPORT, player.origin +
v_forward * 32,
'0 0 0', 1);
1640 STAT(ROUNDLOST, it) =
false;
1641 it.ons_deathloc =
'0 0 0';
1643 it.clientcamera = it;
1652 player.ons_deathloc =
'0 0 0';
1659 player.ons_deathloc =
'0 0 0';
1668 player.player_blocked =
true;
1675 l.sprite.SendFlags |= 16;
1679 l.sprite.SendFlags |= 16;
1682 if(
ons_stalemate) { Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_OVERTIME_CONTROLPOINT); }
1685 if ( player.ons_spawn_by )
1688 player.ons_spawn_by =
NULL;
1697 vector spawn_loc = player.ons_deathloc;
1700 if(spawn_loc ==
'0 0 0') {
return false; }
1704 for(tmp_entity =
ons_worldcplist; tmp_entity; tmp_entity = tmp_entity.ons_worldcpnext)
1710 else if(
vlen2(tmp_entity.origin - spawn_loc) <=
vlen2(closest_target.origin - spawn_loc) || closest_target ==
NULL)
1711 closest_target = tmp_entity;
1721 float iteration_scale = 1;
1722 for(i = 0; i < 10; ++i)
1724 iteration_scale -= i / 10;
1725 loc = closest_target.origin +
'0 0 96' * iteration_scale;
1726 loc += (
'0 1 0' *
random()) * 128 * iteration_scale;
1727 tracebox(loc, STAT(PL_MIN, player), STAT(PL_MAX, player), loc,
MOVE_NORMAL, player);
1730 traceline(closest_target.origin, loc,
MOVE_NOMONSTERS, closest_target);
1747 vector spawn_loc = player.ons_deathloc;
1750 if(spawn_loc ==
'0 0 0') {
return false; }
1761 if(
vlen2(tmp_entity.origin - spawn_loc) <=
vlen2(closest_target.origin - spawn_loc) || closest_target ==
NULL)
1762 closest_target = tmp_entity;
1772 float iteration_scale = 1;
1773 for(i = 0; i < 10; ++i)
1775 iteration_scale -= i / 10;
1776 loc = closest_target.origin +
'0 0 128' * iteration_scale;
1777 loc += (
'0 1 0' *
random()) * 256 * iteration_scale;
1778 tracebox(loc, STAT(PL_MIN, player), STAT(PL_MAX, player), loc,
MOVE_NORMAL, player);
1781 traceline(closest_target.origin, loc,
MOVE_NOMONSTERS, closest_target);
1800 frag_target.ons_deathloc = frag_target.origin;
1804 l.sprite.SendFlags |= 16;
1808 l.sprite.SendFlags |= 16;
1813 stuffcmd(frag_target,
"qc_cmd_cl hud clickradar\n");
1831 if(!own) {
delete(
this);
return; }
1840 own.use(own, e,
NULL);
1860 if(!own) {
delete(
this);
return; }
1870 own.use(own, e,
NULL);
1915 STAT(ROUNDLOST, client) = STAT(ROUNDLOST, spectatee);
1927 if ( cmd_name ==
"ons_spawn" )
1929 vector pos = player.origin;
1939 if ( !STAT(FROZEN, player) )
1945 sprint(player,
"\nYou need to be next to a control point\n");
1952 if ( closest_target ==
NULL )
1954 sprint(player,
"\nNo control point found\n");
1960 player.ons_spawn_by = closest_target;
1961 player.respawn_flags = player.respawn_flags |
RESPAWN_FORCE;
1965 if ( source_point == closest_target )
1967 sprint(player,
"\nTeleporting to the same point\n");
1972 sprint(player,
"\nUnable to teleport there\n");
1978 sprint(player,
"\nNo teleportation for you\n");
1992 if((
time > player.teleport_antispam) && (!
IS_DEAD(player)) && !player.vehicle)
1997 stuffcmd(player,
"qc_cmd_cl hud clickradar\n");
2007 return (frag_victim.classname ==
"onslaught_generator" && !frag_victim.isshielded)
2008 || (frag_victim.classname ==
"onslaught_controlpoint_icon" && !frag_victim.owner.isshielded);
2016 int wp_flag =
M_ARGV(3,
int);
2020 if(wp.owner.classname ==
"onslaught_controlpoint")
2022 entity wp_owner = wp.owner;
2023 entity e = WaypointSprite_getviewentity(to);
2027 if(wp.owner.classname ==
"onslaught_generator")
2029 entity wp_owner = wp.owner;
2030 if(wp_owner.isshielded &&
GetResource(wp_owner,
RES_HEALTH) >= wp_owner.max_health) { wp_flag |= 2; }
2035 M_ARGV(3,
int) = wp_flag;
2042 if(
substring(turret_target.classname, 0, 10) ==
"onslaught_")
2060 turret.team = e.team;
2063 if(turret.team != turret.tur_head.team)
2086 objerror(
this,
"target and target2 must be set\n");
2139 field(SP_ONS_TAKES,
"takes", 0);
2157 cam =
new(objective_camera);
void ons_MonsterSpawn_Delayed(entity this)
const int NUM_TEAMS
Number of teams in the game.
entity ons_Generator_Waypoint(entity e)
void Onslaught_RoundStart()
int Team_GetWinnerTeam_WithOwnedItems(int min_control_points)
Returns the winner team.
ERASEABLE void IL_REMOVE(IntrusiveList this, entity it)
Remove any element, anywhere in the list.
float nearestwaypointtimeout
#define APP_TEAM_NUM(num, prefix)
#define GameRules_scoring(teams, spprio, stprio, fields)
bool wpforenemy_announced
#define IL_EACH(this, cond, body)
float havocbot_role_timeout
int ons_Count_SelfControlPoints(entity this)
find the number of control points and generators in the same team as this
void ons_ControlPoint_Icon_BuildThink(entity this)
void SpectateCopy(entity this, entity spectatee)
bool Onslaught_CheckWinner()
void ons_GeneratorReset(entity this)
MUTATOR_HOOKFUNCTION(ons, reset_map_global)
void navigation_goalrating_start(entity this)
void turret_respawn(entity this)
float autocvar_g_onslaught_round_timelimit
void havocbot_goalrating_items(entity this, float ratingscale, vector org, float sradius)
spree_inf s1 s2 s3loc s2 s1
void ons_DelayedControlPoint_Setup(entity this)
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
int ons_ControlPoint_CanBeLinked(entity cp, int teamnum)
void ons_CaptureShield_Spawn(entity this, Model shield_model)
bool clientcamera_send(entity this, entity to, int sf)
void ons_GeneratorThink(entity this)
const float GEN_THINKRATE
void navigation_goalrating_end(entity this)
void ons_ControlPoint_Reset(entity this)
float autocvar_g_onslaught_warmup
void onslaught_generator_touch(entity this, entity toucher)
void round_handler_Spawn(bool() canRoundStart_func, bool() canRoundEnd_func, void() roundStart_func)
void bot_aim_reset(entity this)
ERASEABLE void RandomSelection_Init()
float TeamScore_AddToTeam(int t, float scorefield, float score)
Adds a score to the given team.
void ons_ControlPoint_Setup(entity cp)
entity havocbot_ons_target
void TeamBalance_Destroy(entity balance)
Destroy the team balance entity.
void nades_Clear(entity e)
const int HAVOCBOT_ONS_ROLE_ASSISTANT
const int SFL_SORT_PRIO_SECONDARY
Scoring priority (NOTE: PRIMARY is used for fraglimit)
void ons_CaptureShield_Touch(entity this, entity toucher)
#define FOREACH_CLIENT(cond, body)
bool ons_CaptureShield_Customize(entity this, entity client)
#define GameRules_scoring_add(client, fld, value)
void ons_ControlPoint_Icon_Think(entity this)
float checkpvs(vector viewpos, entity viewee)
void SUB_UseTargets(entity this, entity actor, entity trigger)
const int SFL_SORT_PRIO_PRIMARY
const vector GENERATOR_MIN
bool ons_Teleport(entity player, entity tele_target, float range, bool tele_effects)
Teleport player to a random position near tele_target if tele_effects is true, teleport sound+particl...
const vector CPGEN_WAYPOINT_OFFSET
bool autocvar_g_onslaught_spawn_at_controlpoints
spawnfunc(onslaught_link)
bool autocvar_g_onslaught_spawn_at_generator
entity ons_Nearest_ControlPoint(entity this, vector pos, float max_dist)
#define round_handler_IsRoundStarted()
entity ons_Nearest_ControlPoint_2D(entity this, vector pos, float max_dist)
entity ons_ControlPoint_Waypoint(entity e)
ERASEABLE bool IL_CONTAINS(IntrusiveList this, entity it)
void havocbot_goalrating_enemyplayers(entity this, float ratingscale, vector org, float sradius)
int Team_GetNumberOfOwnedItems(entity team_ent)
Returns the number of items owned by a team.
entity Entity_GetTeam(entity this)
Returns the team entity of the given entity.
void Team_SetNumberOfOwnedItems(entity team_ent, int number)
Sets the number of items owned by a team.
void navigation_routerating(entity this, entity e, float f, float rangebias)
float havocbot_attack_time
IntrusiveList g_bot_targets
#define IS_REAL_CLIENT(v)
void TakeResource(entity receiver, Resource res_type, float amount)
Takes an entity some resource.
void ons_GeneratorDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
#define setmodel(this, m)
const int SPRITERULE_TEAMPLAY
float ons_notification_time[17]
void onslaught_controlpoint_icon_link(entity e, void(entity this) spawnproc)
float autocvar_g_onslaught_shield_force
float autocvar_g_onslaught_spawn_at_controlpoints_random
#define RandomSelection_AddEnt(e, weight, priority)
void ons_DelayedInit(entity this)
void ons_camSetup(entity this)
ERASEABLE vector randompos(vector m1, vector m2)
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
float autocvar_g_onslaught_teleport_wait
float autocvar_g_onslaught_spawn_at_generator_chance
void SV_ParseClientCommand(entity this, string command)
float autocvar_g_onslaught_spawn_at_controlpoints_chance
int TeamBalance_GetAllowedTeams(entity balance)
Returns the bitmask of allowed teams.
const float MOVE_NOMONSTERS
bool autocvar__campaign_testrun
#define CPGEN_SPAWN_OFFSET
void ons_ControlPoint_UpdateSprite(entity e)
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
void GiveResourceWithLimit(entity receiver, Resource res_type, float amount, float limit)
Gives an entity some resource but not more than a limit.
float autocvar_g_onslaught_allow_vehicle_touch
int ons_ControlPoint_Attackable(entity cp, int teamnum)
void waypoint_spawnforitem_force(entity e, vector org)
bool navigation_goalrating_timeout(entity this)
void havocbot_role_ons_assistant(entity this)
#define GameRules_scoring_add_team(client, fld, value)
float autocvar_g_onslaught_cp_health
void PlayerUseKey(entity this)
entity RandomSelection_chosen_ent
float autocvar_g_onslaught_spawn_at_generator_random
bool generator_send(entity this, entity to, int sf)
void ons_ControlPoint_Icon_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
entity ons_worldgeneratorlist
void ons_ControlPoint_Think(entity this)
#define round_handler_GetEndTime()
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
#define MUTATOR_RETURNVALUE
float autocvar_g_onslaught_cp_buildhealth
const int HAVOCBOT_ONS_ROLE_OFFENSE
void ons_GeneratorSetup(entity gen)
void onslaught_updatelinks()
const float ONS_CP_THINKRATE
entity Team_GetTeamFromIndex(int index)
Returns the global team entity at the given index.
IntrusiveList g_waypoints
void ons_TurretSpawn_Delayed(entity this)
void navigation_goalrating_timeout_set(entity this)
bool havocbot_goalrating_ons_generator_attack(entity this, float ratingscale)
void havocbot_role_ons_setrole(entity this, int role)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
IntrusiveList g_onsshields
bool ons_GeneratorHeal(entity targ, entity inflictor, float amount, float limit)
float autocvar_g_onslaught_teleport_radius
void ons_Generator_UpdateSprite(entity e)
void GiveResource(entity receiver, Resource res_type, float amount)
Gives an entity some resource.
float autocvar_g_onslaught_gen_health
void ons_ControlPoint_Icon_Spawn(entity cp, entity player)
float autocvar_g_onslaught_cp_proxydecap
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
float autocvar_g_onslaught_cp_buildtime
void InitializeEntity(entity e, void(entity this) func, int order)
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
bool Onslaught_CheckPlayers()
void havocbot_goalrating_ons_controlpoints_attack(entity this, float ratingscale)
bool ons_Link_Send(entity this, entity to, int sendflags)
float autocvar_g_onslaught_cp_proxydecap_dps
void havocbot_role_ons_offense(entity this)
const float SOLID_TRIGGER
entity EFFECT_FLAG_TOUCH(int teamid)
float autocvar_g_onslaught_cp_proxydecap_distance
const vector GENERATOR_MAX
float autocvar_g_onslaught_click_radius
IntrusiveList g_saved_team
#define IS_BOT_CLIENT(v)
want: (IS_CLIENT(v) && !IS_REAL_CLIENT(v))
float frame
primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4)
void ons_ControlPoint_Touch(entity this, entity toucher)
const int HAVOCBOT_ONS_ROLE_DEFENSE
void ons_DelayedGeneratorSetup(entity this)
void havocbot_role_ons_defense(entity this)
float ons_captureshield_force
entity TeamBalance_CheckAllowedTeams(entity for_whom)
Checks whether the player can join teams according to global configuration and mutator settings...
bool ons_ControlPoint_Icon_Heal(entity targ, entity inflictor, float amount, float limit)
void havocbot_ons_reset_role(entity this)
#define sound(e, c, s, v, a)
void round_handler_Init(float the_delay, float the_count, float the_round_timelimit)
#define Team_ColoredFullName(teamid)
void ons_CaptureShield_Reset(entity this)
float autocvar_timelimit_suddendeath
void ons_Link_CheckUpdate(entity this)
int Team_TeamToBit(int team_num)
Converts team value into bit value that is used in team bitmasks.
void ons_DelayedLinkSetup(entity this)
bool Team_IsValidTeam(int team_num)
Returns whether team value is valid.
void set_movetype(entity this, int mt)
entity EFFECT_CAP(int teamid)
float autocvar_g_onslaught_cp_regen
#define colormapPaletteColor(c, isPants)
void Onslaught_count_generators()
const vector CPICON_OFFSET
float autocvar_g_onslaught_spawn_choose