Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
sv_domination.qc
Go to the documentation of this file.
1#include "sv_domination.qh"
2
3#include <server/client.qh>
5#include <server/damage.qh>
6#include <server/gamelog.qh>
8#include <server/teamplay.qh>
9#include <server/world.qh>
12
14
23
24void dom_EventLog(string mode, float team_before, entity actor) // use an alias for easy changing and quick editing later
25{
27 GameLogEcho(strcat(":dom:", mode, ":", ftos(team_before), ((actor != NULL) ? (strcat(":", ftos(actor.playerid))) : "")));
28}
29
31{
32 STAT(DOM_TOTAL_PPS, e) = total_pps;
33 STAT(DOM_PPS_RED, e) = pps_red;
34 STAT(DOM_PPS_BLUE, e) = pps_blue;
35 if(domination_teams & BIT(2))
36 STAT(DOM_PPS_YELLOW, e) = pps_yellow;
37 if(domination_teams & BIT(3))
38 STAT(DOM_PPS_PINK, e) = pps_pink;
39}
40
42{
43 float old_delay, old_team, real_team;
44
45 // now that the delay has expired, switch to the latest team to lay claim to this point
46 entity head = this.owner;
47
48 real_team = this.cnt;
49 this.cnt = -1;
50
51 dom_EventLog("taken", this.team, this.dmg_inflictor);
52 this.dmg_inflictor = NULL;
53
54 this.goalentity = head;
55 this.model = head.mdl;
56 this.modelindex = head.dmg;
57 this.skin = head.skin;
58
59 float points, wait_time;
62 else
63 points = this.frags;
66 else
67 wait_time = this.wait;
68
70 bprint(sprintf("^3%s^3%s\n", head.netname, this.message));
71 else
72 Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_DOMINATION_CAPTURE_TIME, head.netname, this.message, points, wait_time);
73
74 if(this.enemy.playerid == this.enemy_playerid)
75 GameRules_scoring_add(this.enemy, DOM_TAKES, 1);
76 else
77 this.enemy = NULL;
78
79 if (head.noise != "")
80 {
81 if(this.enemy)
82 _sound(this.enemy, CH_TRIGGER, head.noise, VOL_BASE, ATTEN_NORM);
83 else
84 _sound(this, CH_TRIGGER, head.noise, VOL_BASE, ATTEN_NORM);
85 }
86 if (head.noise1 != "")
87 play2all(head.noise1);
88
89 this.delay = time + wait_time;
90
91 // do trigger work
92 old_delay = this.delay;
93 old_team = this.team;
94 this.team = real_team;
95 this.delay = 0;
96 SUB_UseTargets (this, this, NULL);
97 this.delay = old_delay;
98 this.team = old_team;
99
100 entity msg = WP_DomNeut;
101 switch(real_team)
102 {
103 case NUM_TEAM_1: msg = WP_DomRed; break;
104 case NUM_TEAM_2: msg = WP_DomBlue; break;
105 case NUM_TEAM_3: msg = WP_DomYellow; break;
106 case NUM_TEAM_4: msg = WP_DomPink; break;
107 }
108
109 WaypointSprite_UpdateSprites(this.sprite, msg, WP_Null, WP_Null);
110
111 total_pps = 0, pps_red = 0, pps_blue = 0, pps_yellow = 0, pps_pink = 0;
112 IL_EACH(g_dompoints, true,
113 {
116 else
117 points = it.frags;
120 else
121 wait_time = it.wait;
122 switch(it.goalentity.team)
123 {
124 case NUM_TEAM_1: pps_red += points/wait_time; break;
125 case NUM_TEAM_2: pps_blue += points/wait_time; break;
126 case NUM_TEAM_3: pps_yellow += points/wait_time; break;
127 case NUM_TEAM_4: pps_pink += points/wait_time; break;
128 }
129 total_pps += points/wait_time;
130 });
131
132 WaypointSprite_UpdateTeamRadar(this.sprite, RADARICON_DOMPOINT, colormapPaletteColor(this.goalentity.team - 1, 0));
134
135 this.captime = time;
136
138}
139
141{
142 if(this.pain_finished > time)
143 return;
144 this.pain_finished = time + this.t_width;
145 if(this.nextthink > this.pain_finished)
146 this.nextthink = this.pain_finished;
147
148 this.frame = this.frame + 1;
149 if(this.frame > this.t_length)
150 this.frame = 0;
151}
152
154{
155 float fragamt;
156
157 this.nextthink = time + 0.1;
158
159 //this.frame = this.frame + 1;
160 //if(this.frame > 119)
161 // this.frame = 0;
162 AnimateDomPoint(this);
163
164 // give points
165
166 if (game_stopped || this.delay > time || time < game_starttime) // game has ended, don't keep giving points
167 return;
168
171 else
172 this.delay = time + this.wait;
173
174 // give credit to the team
175 // NOTE: this defaults to 0
177 if (this.goalentity.netname != "")
178 {
181 else
182 fragamt = this.frags;
183 TeamScore_AddToTeam(this.goalentity.team, ST_SCORE, fragamt);
184 TeamScore_AddToTeam(this.goalentity.team, ST_DOM_TICKS, fragamt);
185
186 // give credit to the individual player, if they are still there
187 if (this.enemy.playerid == this.enemy_playerid)
188 {
189 GameRules_scoring_add(this.enemy, SCORE, fragamt);
190 GameRules_scoring_add(this.enemy, DOM_TICKS, fragamt);
191 }
192 else
193 this.enemy = NULL;
194 }
195}
196
198{
199 if(!IS_PLAYER(toucher))
200 return;
201 if(IS_DEAD(toucher))
202 return;
204 return;
205
207 return;
208
209 if(time < this.captime + 0.3)
210 return;
211
212 // only valid teams can claim it
213 entity head = find(NULL, classname, "dom_team");
214 while (head && head.team != toucher.team)
215 head = find(head, classname, "dom_team");
216 if (!head || head.netname == "" || head == this.goalentity)
217 return;
218
219 // delay capture
220
221 this.team = this.goalentity.team; // this stores the PREVIOUS team!
222
223 this.cnt = toucher.team;
224 this.owner = head; // team to switch to after the delay
225 this.dmg_inflictor = toucher;
226
227 // this.state = 1;
228 // this.delay = time + cvar("g_domination_point_capturetime");
229 //this.nextthink = time + cvar("g_domination_point_capturetime");
230 //this.think = dompoint_captured;
231
232 // go to neutral team in the mean time
233 head = find(NULL, classname, "dom_team");
234 while (head && head.netname != "")
235 head = find(head, classname, "dom_team");
236 if(head == NULL)
237 return;
238
239 WaypointSprite_UpdateSprites(this.sprite, WP_DomNeut, WP_Null, WP_Null);
240 WaypointSprite_UpdateTeamRadar(this.sprite, RADARICON_DOMPOINT, '0 1 1');
242
243 this.goalentity = head;
244 this.model = head.mdl;
245 this.modelindex = head.dmg;
246 this.skin = head.skin;
247
248 this.enemy = toucher; // individual player scoring
249 this.enemy_playerid = toucher.playerid;
250 dompoint_captured(this);
251}
252
254{
255 entity head;
256 // find the spawnfunc_dom_team representing unclaimed points
257 head = find(NULL, classname, "dom_team");
258 while(head && head.netname != "")
259 head = find(head, classname, "dom_team");
260 if (!head)
261 objerror(this, "no spawnfunc_dom_team with netname \"\" found\n");
262
263 // copy important properties from spawnfunc_dom_team entity
264 this.goalentity = head;
265 _setmodel(this, head.mdl); // precision already set
266 this.skin = head.skin;
267
268 this.cnt = -1;
269
270 if(this.message == "")
271 this.message = " has captured a control point";
272
273 if(this.frags <= 0)
274 this.frags = 1;
275 if(this.wait <= 0)
276 this.wait = 5;
277
278 float points, waittime;
281 else
282 points = this.frags;
285 else
286 waittime = this.wait;
287
288 total_pps += points/waittime;
289
290 if(!this.t_width)
291 this.t_width = 0.02; // frame animation rate
292 if(!this.t_length)
293 this.t_length = 239; // maximum frame
294
295 setthink(this, dompointthink);
296 this.nextthink = time;
297 settouch(this, dompointtouch);
298 this.solid = SOLID_TRIGGER;
299 if(!this.flags & FL_ITEM)
300 IL_PUSH(g_items, this);
301 this.flags = FL_ITEM;
302 setsize(this, '-48 -48 -32', '48 48 32'); // 0.8.6 used '-32 -32 -32', '32 32 32' with sv_legacy_bbox_expand 1 and FL_ITEM
303 setorigin(this, this.origin + '0 0 20');
305
307 WaypointSprite_SpawnFixed(WP_DomNeut, this.origin + '0 0 32', this, sprite, RADARICON_DOMPOINT);
308}
309
312{
314 for (int i = 1; i <= NUM_TEAMS; ++i)
315 {
317 }
318 IL_EACH(g_dompoints, true,
319 {
321 if (!Entity_HasValidTeam(it.goalentity))
322 {
323 continue;
324 }
325 entity team_ = Entity_GetTeam(it.goalentity);
326 int num_control_points = Team_GetNumberOfOwnedItems(team_);
327 ++num_control_points;
328 Team_SetNumberOfOwnedItems(team_, num_control_points);
329 });
330}
331
333{
335 {
336 Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_ROUND_OVER);
337 Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ROUND_OVER);
338
339 game_stopped = true;
341 return true;
342 }
343
346 if (winner_team == -1)
347 return 0;
348
349 if(winner_team > 0)
350 {
351 Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_WIN));
352 Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(winner_team, INFO_ROUND_TEAM_WIN));
353 TeamScore_AddToTeam(winner_team, ST_DOM_CAPS, +1);
354 }
355
356 game_stopped = true;
358
359 return true;
360}
361
363{
364 return true;
365}
366
368{
369 FOREACH_CLIENT(IS_PLAYER(it), { it.player_blocked = false; });
370}
371
372//go to best items, or control points you don't own
373void havocbot_goalrating_controlpoints(entity this, float ratingscale, vector org, float sradius)
374{
375 IL_EACH(g_dompoints, vdist((((it.absmin + it.absmax) * 0.5) - org), <, sradius),
376 {
377 if(it.cnt > -1) // this is just being fought
378 navigation_routerating(this, it, ratingscale, 5000);
379 else if(it.goalentity.cnt == 0) // unclaimed
380 navigation_routerating(this, it, ratingscale, 5000);
381 else if(it.goalentity.team != this.team) // other team's point
382 navigation_routerating(this, it, ratingscale, 5000);
383 });
384}
385
387{
388 if(IS_DEAD(this))
389 return;
390
392 {
394 havocbot_goalrating_controlpoints(this, 10000, this.origin, 15000);
395 havocbot_goalrating_items(this, 20000, this.origin, 8000);
396 //havocbot_goalrating_enemyplayers(this, 1500, this.origin, 2000);
397 havocbot_goalrating_waypoints(this, 1, this.origin, 3000);
399
401 }
402}
403
405{
406 // fallback?
407 M_ARGV(0, float) = domination_teams;
408 string ret_string = "dom_team";
409
410 entity head = find(NULL, classname, ret_string);
411 while(head)
412 {
413 if(head.netname != "")
414 {
415 if (Team_IsValidTeam(head.team))
416 {
417 M_ARGV(0, float) |= Team_TeamToBit(head.team);
418 }
419 }
420
421 head = find(head, classname, ret_string);
422 }
423
424 M_ARGV(1, string) = string_null;
425
426 return true;
427}
428
429MUTATOR_HOOKFUNCTION(dom, reset_map_players)
430{
431 total_pps = 0, pps_red = 0, pps_blue = 0, pps_yellow = 0, pps_pink = 0;
432 FOREACH_CLIENT(true, {
433 if (IS_PLAYER(it))
434 {
437 it.player_blocked = 1;
438 }
439 if(IS_REAL_CLIENT(it))
440 set_dom_state(it);
441 });
442 return true;
443}
444
445MUTATOR_HOOKFUNCTION(dom, PlayerSpawn)
446{
447 entity player = M_ARGV(0, entity);
448
450 player.player_blocked = !round_handler_IsRoundStarted();
451}
452
454{
455 entity player = M_ARGV(0, entity);
456
457 set_dom_state(player);
458}
459
460MUTATOR_HOOKFUNCTION(dom, HavocBot_ChooseRole)
461{
462 entity bot = M_ARGV(0, entity);
463
464 bot.havocbot_role = havocbot_role_dom;
465 return true;
466}
467
468/*QUAKED spawnfunc_dom_controlpoint (0 .5 .8) (-16 -16 -24) (16 16 32)
469Control point for Domination gameplay.
470*/
471spawnfunc(dom_controlpoint)
472{
473 if(!g_domination)
474 {
475 delete(this);
476 return;
477 }
479 this.nextthink = time + 0.1;
480 this.reset = dom_controlpoint_setup;
481
482 if(!this.scale)
483 this.scale = 0.6;
484
485 this.effects = this.effects | EF_LOWPRECISION;
487 this.effects |= EF_FULLBRIGHT;
488
489 IL_PUSH(g_dompoints, this);
490}
491
492 // Quake Live CP
493/*QUAKED team_dom_point (0 .2 1) (-16 -16 0) (16 16 88)
494Domination capture point.
495-------- KEYS --------
496identifier : Set to 1, 2, or 3 to match to point 'A', 'B', or 'C'.
497count : Adjust the range of the capture point (in units, eg: 64, 128... etc).
498target : Target name for multiple info_player_deathmatch entities (to allow spawning near that particular dom point).
499-------- NOTES --------
500Do not assign a 'gametype' key to this item. It is used in all four team gametypes. The game will call for it as needed.
501-------- MODEL FOR RADIANT ONLY - DO NOT SET THIS AS A KEY --------
502model="models/powerups/domination/dompoint.md3"
503*/
504spawnfunc(team_dom_point)
505{
506 spawnfunc_dom_controlpoint(this);
507}
508
509/*QUAKED spawnfunc_dom_team (0 .5 .8) (-32 -32 -24) (32 32 32)
510Team declaration for Domination gameplay, this allows you to decide what team
511names and control point models are used in your map.
512
513Note: If you use spawnfunc_dom_team entities you must define at least 3 and only two
514can have netname set! The nameless team owns all control points at start.
515
516Keys:
517"netname"
518 Name of the team (for example Red Team, Blue Team, Green Team, Yellow Team, Life, Death, etc)
519"cnt"
520 Scoreboard color of the team (for example 4 is red and 13 is blue)
521"model"
522 Model to use for control points owned by this team (for example
523 "progs/b_g_key.mdl" is a gold keycard, and "progs/b_s_key.mdl" is a silver
524 keycard)
525"skin"
526 Skin of the model to use (for team skins on a single model)
527"noise"
528 Sound to play when this team captures a point.
529 (this is a localized sound, like a small alarm or other effect)
530"noise1"
531 Narrator speech to play when this team captures a point.
532 (this is a global sound, like "Red team has captured a control point")
533*/
534
535spawnfunc(dom_team)
536{
538 {
539 delete(this);
540 return;
541 }
542 precache_model(this.model);
543 if (this.noise != "")
544 precache_sound(this.noise);
545 if (this.noise1 != "")
547 _setmodel(this, this.model); // precision not needed
548 this.mdl = this.model;
549 this.dmg = this.modelindex;
550 this.model = "";
551 this.modelindex = 0;
552 // this would have to be changed if used in quakeworld
553 if(this.cnt)
554 this.team = this.cnt + 1; // WHY are these different anyway?
555}
556
557// scoreboard setup
559{
561 {
563 field_team(ST_DOM_CAPS, "caps", SFL_SORT_PRIO_PRIMARY);
564 field(SP_DOM_TAKES, "takes", 0);
565 });
566 }
567 else
568 {
569 float sp_domticks, sp_score;
570 sp_score = sp_domticks = 0;
572 sp_domticks = SFL_SORT_PRIO_PRIMARY;
573 else
574 sp_score = SFL_SORT_PRIO_PRIMARY;
575 GameRules_scoring(teams, sp_score, sp_score, {
576 field_team(ST_DOM_TICKS, "ticks", sp_domticks);
577 field(SP_DOM_TICKS, "ticks", sp_domticks);
578 field(SP_DOM_TAKES, "takes", 0);
579 });
580 }
581}
582
583// code from here on is just to support maps that don't have control point and team entities
584void dom_spawnteam(string teamname, float teamcolor, string pointmodel, float pointskin, Sound capsound, string capnarration, string capmessage)
585{
586 TC(Sound, capsound);
587 entity e = new_pure(dom_team);
588 e.netname = strzone(teamname);
589 e.cnt = teamcolor;
590 e.model = pointmodel;
591 e.skin = pointskin;
592 e.noise = strzone(Sound_fixpath(capsound));
593 e.noise1 = strzone(capnarration);
594 e.message = strzone(capmessage);
595
596 // this code is identical to spawnfunc_dom_team
597 _setmodel(e, e.model); // precision not needed
598 e.mdl = e.model;
599 e.dmg = e.modelindex;
600 e.model = "";
601 e.modelindex = 0;
602 // this would have to be changed if used in quakeworld
603 e.team = e.cnt + 1;
604
605 //eprint(e);
606}
607
609{
610 entity e = spawn();
611 setthink(e, spawnfunc_dom_controlpoint);
612 e.nextthink = time;
613 setorigin(e, org);
614 spawnfunc_dom_controlpoint(e);
615}
616
617// spawn some default teams if the map is not set up for domination
619{
620 TC(int, teams);
621 dom_spawnteam(Team_ColoredFullName(NUM_TEAM_1), NUM_TEAM_1-1, "models/domination/dom_red.md3", 0, SND_DOM_CLAIM, "", "Red team has captured a control point");
622 dom_spawnteam(Team_ColoredFullName(NUM_TEAM_2), NUM_TEAM_2-1, "models/domination/dom_blue.md3", 0, SND_DOM_CLAIM, "", "Blue team has captured a control point");
623 if(teams & BIT(2))
624 dom_spawnteam(Team_ColoredFullName(NUM_TEAM_3), NUM_TEAM_3-1, "models/domination/dom_yellow.md3", 0, SND_DOM_CLAIM, "", "Yellow team has captured a control point");
625 if(teams & BIT(3))
626 dom_spawnteam(Team_ColoredFullName(NUM_TEAM_4), NUM_TEAM_4-1, "models/domination/dom_pink.md3", 0, SND_DOM_CLAIM, "", "Pink team has captured a control point");
627 dom_spawnteam("", 0, "models/domination/dom_unclaimed.md3", 0, SND_Null, "", "");
628}
629
630void dom_DelayedInit(entity this) // Do this check with a delay so we can wait for teams to be set up.
631{
632 // if no teams are found, spawn defaults
633 if(find(NULL, classname, "dom_team") == NULL || autocvar_g_domination_teams_override >= 2)
634 {
635 LOG_TRACE("No \"dom_team\" entities found on this map, creating them anyway.");
637 if (domination_teams < 2)
641 }
642 else
643 {
646 TeamBalance_Destroy(balance);
647 }
648
650
652
654 {
657 }
658}
659
float frame
primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4)
Definition anim.qh:6
void havocbot_goalrating_waypoints(entity this, float ratingscale, vector org, float sradius)
Definition roles.qc:16
void waypoint_spawnforitem(entity e)
void navigation_goalrating_start(entity this)
void navigation_goalrating_timeout_set(entity this)
Definition navigation.qc:20
bool navigation_goalrating_timeout(entity this)
Definition navigation.qc:44
void navigation_goalrating_end(entity this)
#define MUTATOR_HOOKFUNCTION(...)
Definition base.qh:335
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
Definition bits.qh:8
#define BITS(n)
Definition bits.qh:9
float dmg
Definition breakable.qc:12
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float pain_finished
float cnt
Definition powerups.qc:24
string message
Definition powerups.qc:19
float delay
Definition items.qc:17
float wait
Definition items.qc:17
entity owner
Definition main.qh:87
int team
Definition main.qh:188
entity teams
Definition main.qh:58
#define colormapPaletteColor(c, isPants)
Definition color.qh:5
string mdl
Definition item.qh:89
#define M_ARGV(x, type)
Definition events.qh:17
#define IS_DEAD(s)
Definition player.qh:245
#define IS_PLAYER(s)
Definition player.qh:243
const int ST_SCORE
Definition scores.qh:158
const int SFL_SORT_PRIO_PRIMARY
Definition scores.qh:134
float game_starttime
Definition stats.qh:82
float game_stopped
Definition stats.qh:81
const int INITPRIO_GAMETYPE
Definition constants.qh:94
const int FL_ITEM
Definition constants.qh:77
string classname
float flags
const float SOLID_TRIGGER
float modelindex
const float EF_FULLBRIGHT
float effects
float skin
float time
float nextthink
vector origin
#define spawn
float EF_LOWPRECISION
model
Definition ent_cs.qc:139
solid
Definition ent_cs.qc:165
int frags
Definition ent_cs.qh:71
void GameLogEcho(string s)
Definition gamelog.qc:15
bool autocvar_sv_eventlog
Definition gamelog.qh:3
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define IL_NEW()
#define IL_EACH(this, cond, body)
void SUB_UseTargets(entity this, entity actor, entity trigger)
Definition triggers.qc:344
#define ClientConnect
Definition _all.inc:238
#define PutClientInServer
Definition _all.inc:246
#define TC(T, sym)
Definition _all.inc:82
#define STAT(...)
Definition stats.qh:82
#define LOG_TRACE(...)
Definition log.qh:76
entity goalentity
Definition viewloc.qh:16
float bound(float min, float value, float max)
entity find(entity start,.string field, string match)
void bprint(string text,...)
string precache_sound(string sample)
string ftos(float f)
string strzone(string s)
string string_null
Definition nil.qh:9
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
void Send_Notification(NOTIF broadcast, entity client, MSG net_type, Notification net_name,...count)
Definition all.qc:1573
#define APP_TEAM_NUM(num, prefix)
Definition all.qh:84
#define new_pure(class)
purely logical entities (not linked to the area grid)
Definition oo.qh:67
#define NULL
Definition post.qh:14
#define objerror
Definition pre.qh:8
entity dmg_inflictor
Definition progsdefs.qc:200
float scale
Definition projectile.qc:14
void round_handler_Init(float the_delay, float the_count, float the_round_timelimit)
void round_handler_Spawn(bool() canRoundStart_func, bool() canRoundEnd_func, void() roundStart_func)
#define round_handler_IsActive()
#define round_handler_GetEndTime()
#define round_handler_IsRoundStarted()
float TeamScore_AddToTeam(int t, float scorefield, float score)
Adds a score to the given team.
Definition scores.qc:107
#define setthink(e, f)
vector
Definition self.qh:92
vector org
Definition self.qh:92
entity entity toucher
Definition self.qh:72
#define settouch(e, f)
Definition self.qh:73
#define IS_INDEPENDENT_PLAYER(e)
Definition client.qh:312
IntrusiveList g_items
Definition items.qh:125
const int CH_TRIGGER
Definition sound.qh:12
#define Sound_fixpath(this)
Definition sound.qh:141
const float VOL_BASE
Definition sound.qh:36
#define _sound(e, c, s, v, a)
Definition sound.qh:43
const float ATTEN_NORM
Definition sound.qh:30
void play2all(string samp)
Definition all.qc:142
#define spawnfunc(id)
Definition spawnfunc.qh:96
string noise
Definition subs.qh:83
string noise1
Definition subs.qh:83
float t_width
Definition subs.qh:33
float t_length
Definition subs.qh:33
entity sprite
Definition sv_assault.qc:11
entity enemy
Definition sv_ctf.qh:153
float autocvar_g_domination_round_timelimit
void dom_DelayedInit(entity this)
void dom_controlpoint_setup(entity this)
bool autocvar_g_domination_point_fullbright
void Domination_count_controlpoints()
int autocvar_g_domination_default_teams
void set_dom_state(entity e)
void havocbot_role_dom(entity this)
bool autocvar_g_domination_disable_frags
void Domination_RoundStart()
int autocvar_g_domination_point_amt
void dompointtouch(entity this, entity toucher)
void dom_spawnteams(int teams)
bool g_domination
void dom_spawnpoint(vector org)
bool Domination_CheckPlayers()
void havocbot_goalrating_controlpoints(entity this, float ratingscale, vector org, float sradius)
void ScoreRules_dom(int teams)
void dom_spawnteam(string teamname, float teamcolor, string pointmodel, float pointskin, Sound capsound, string capnarration, string capmessage)
int total_control_points
void dom_Initialize()
int autocvar_g_domination_teams_override
float autocvar_g_domination_point_rate
void dompointthink(entity this)
void dom_EventLog(string mode, float team_before, entity actor)
void AnimateDomPoint(entity this)
bool Domination_CheckWinner()
void dompoint_captured(entity this)
float autocvar_g_domination_warmup
float pps_blue
float total_pps
const float ST_DOM_CAPS
float enemy_playerid
float domination_teams
float domination_roundbased
const float ST_DOM_TICKS
float pps_yellow
bool autocvar_g_domination_roundbased
float pps_pink
float pps_red
IntrusiveList g_dompoints
float captime
void havocbot_goalrating_items(entity this, float ratingscale, vector org, float sradius)
Definition roles.qc:106
#define GameRules_scoring_add(client, fld, value)
Definition sv_rules.qh:85
#define GameRules_scoring(teams, spprio, stprio, fields)
Definition sv_rules.qh:58
int Team_GetWinnerTeam_WithOwnedItems(int min_control_points)
Returns the winner team.
Definition teamplay.qc:123
void TeamBalance_Destroy(entity balance)
Destroy the team balance entity.
Definition teamplay.qc:599
entity Entity_GetTeam(entity this)
Returns the team entity of the given entity.
Definition teamplay.qc:186
void Team_SetNumberOfOwnedItems(entity team_ent, int number)
Sets the number of items owned by a team.
Definition teamplay.qc:143
int Team_GetNumberOfOwnedItems(entity team_ent)
Returns the number of items owned by a team.
Definition teamplay.qc:138
bool Entity_HasValidTeam(entity this)
Returns whether the given entity belongs to a valid team.
Definition teamplay.qc:176
int TeamBalance_GetAllowedTeams(entity balance)
Returns the bitmask of allowed teams.
Definition teamplay.qc:612
entity TeamBalance_CheckAllowedTeams(entity for_whom)
Checks whether the player can join teams according to global configuration and mutator settings.
Definition teamplay.qc:459
entity Team_GetTeamFromIndex(int index)
Returns the global team entity at the given index.
Definition teamplay.qc:57
bool Team_IsValidTeam(int team_num)
Returns whether team value is valid.
Definition teams.qh:133
int Team_TeamToBit(int team_num)
Converts team value into bit value that is used in team bitmasks.
Definition teams.qh:199
const int NUM_TEAM_2
Definition teams.qh:14
const int NUM_TEAM_4
Definition teams.qh:16
const int NUM_TEAM_3
Definition teams.qh:15
#define Team_ColoredFullName(teamid)
Definition teams.qh:232
const int NUM_TEAMS
Number of teams in the game.
Definition teams.qh:3
const int NUM_TEAM_1
Definition teams.qh:13
#define IS_REAL_CLIENT(v)
Definition utils.qh:17
#define FOREACH_CLIENT(cond, body)
Definition utils.qh:50
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
Definition vector.qh:8
void WaypointSprite_UpdateTeamRadar(entity e, entity icon, vector col)
void WaypointSprite_UpdateSprites(entity e, entity _m1, entity _m2, entity _m3)
void WaypointSprite_Ping(entity e)
entity WaypointSprite_SpawnFixed(entity spr, vector ofs, entity own,.entity ownfield, entity icon)
void DropToFloor_QC_DelayedInit(entity this)
Definition world.qc:2407
void InitializeEntity(entity e, void(entity this) func, int order)
Definition world.qc:2209