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(teamplay_bitmask & BIT(2))
36 STAT(DOM_PPS_YELLOW, e) = pps_yellow;
37 if(teamplay_bitmask & 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 vector expcol = Team_ColorRGB(real_team);
112 Send_Effect_Core(EFFECT_DOM_CAPTURE, this.origin, '0 0 0', 1, expcol, expcol * 0.6 + '0.4 0.4 0.4', -1, -1, -1, NULL);
113
114 total_pps = 0, pps_red = 0, pps_blue = 0, pps_yellow = 0, pps_pink = 0;
115 IL_EACH(g_dompoints, true,
116 {
119 else
120 points = it.frags;
123 else
124 wait_time = it.wait;
125 switch(it.goalentity.team)
126 {
127 case NUM_TEAM_1: pps_red += points/wait_time; break;
128 case NUM_TEAM_2: pps_blue += points/wait_time; break;
129 case NUM_TEAM_3: pps_yellow += points/wait_time; break;
130 case NUM_TEAM_4: pps_pink += points/wait_time; break;
131 }
132 total_pps += points/wait_time;
133 });
134
135 WaypointSprite_UpdateTeamRadar(this.sprite, RADARICON_DOMPOINT, colormapPaletteColor(this.goalentity.team - 1, 0));
137
138 this.captime = time;
139
141}
142
144{
145 if(this.pain_finished > time)
146 return;
147 this.pain_finished = time + this.t_width;
148 if(this.nextthink > this.pain_finished)
149 this.nextthink = this.pain_finished;
150
151 ++this.frame;
152 if(this.frame > this.t_length)
153 this.frame = 0;
154}
155
157{
158 float fragamt;
159
160 this.nextthink = time + 0.1;
161
162 //++this.frame;
163 //if(this.frame > 119)
164 // this.frame = 0;
165 AnimateDomPoint(this);
166
167 // give points
168
169 if (game_stopped || this.delay > time || time < game_starttime) // game has ended, don't keep giving points
170 return;
171
174 else
175 this.delay = time + this.wait;
176
177 // give credit to the team
178 // NOTE: this defaults to 0
180 if (this.goalentity.netname != "")
181 {
184 else
185 fragamt = this.frags;
186 TeamScore_AddToTeam(this.goalentity.team, ST_SCORE, fragamt);
187 TeamScore_AddToTeam(this.goalentity.team, ST_DOM_TICKS, fragamt);
188
189 // give credit to the individual player, if they are still there
190 if (this.enemy.playerid == this.enemy_playerid)
191 {
192 GameRules_scoring_add(this.enemy, SCORE, fragamt);
193 GameRules_scoring_add(this.enemy, DOM_TICKS, fragamt);
194 }
195 else
196 this.enemy = NULL;
197 }
198}
199
201{
202 if(!IS_PLAYER(toucher))
203 return;
204 if(IS_DEAD(toucher))
205 return;
207 return;
208
210 return;
211
212 if(time < this.captime + 0.3)
213 return;
214
215 // only valid teams can claim it
216 entity head = find(NULL, classname, "dom_team");
217 while (head && head.team != toucher.team)
218 head = find(head, classname, "dom_team");
219 if (!head || head.netname == "" || head == this.goalentity)
220 return;
221
222 // delay capture
223
224 this.team = this.goalentity.team; // this stores the PREVIOUS team!
225
226 this.cnt = toucher.team;
227 this.owner = head; // team to switch to after the delay
228 this.dmg_inflictor = toucher;
229
230 // this.state = 1;
231 // this.delay = time + cvar("g_domination_point_capturetime");
232 //this.nextthink = time + cvar("g_domination_point_capturetime");
233 //this.think = dompoint_captured;
234
235 // go to neutral team in the mean time
236 head = find(NULL, classname, "dom_team");
237 while (head && head.netname != "")
238 head = find(head, classname, "dom_team");
239 if(head == NULL)
240 return;
241
242 WaypointSprite_UpdateSprites(this.sprite, WP_DomNeut, WP_Null, WP_Null);
243 WaypointSprite_UpdateTeamRadar(this.sprite, RADARICON_DOMPOINT, '0 1 1');
245
246 this.goalentity = head;
247 this.model = head.mdl;
248 this.modelindex = head.dmg;
249 this.skin = head.skin;
250
251 this.enemy = toucher; // individual player scoring
252 this.enemy_playerid = toucher.playerid;
253 dompoint_captured(this);
254}
255
257{
258 entity head;
259 // find the spawnfunc_dom_team representing unclaimed points
260 head = find(NULL, classname, "dom_team");
261 while(head && head.netname != "")
262 head = find(head, classname, "dom_team");
263 if (!head)
264 objerror(this, "no spawnfunc_dom_team with netname \"\" found\n");
265
266 // copy important properties from spawnfunc_dom_team entity
267 this.goalentity = head;
268 _setmodel(this, head.mdl); // precision already set
269 this.skin = head.skin;
270
271 this.cnt = -1;
272
273 if(this.message == "")
274 this.message = " has captured a control point";
275
276 if(this.frags <= 0)
277 this.frags = 1;
278 if(this.wait <= 0)
279 this.wait = 5;
280
281 float points, waittime;
284 else
285 points = this.frags;
288 else
289 waittime = this.wait;
290
291 total_pps += points/waittime;
292
293 if(!this.t_width)
294 this.t_width = 0.02; // frame animation rate
295 if(!this.t_length)
296 this.t_length = 239; // maximum frame
297
298 setthink(this, dompointthink);
299 this.nextthink = time;
300 settouch(this, dompointtouch);
301 this.solid = SOLID_TRIGGER;
302 if(!this.flags & FL_ITEM)
303 IL_PUSH(g_items, this);
304 this.flags = FL_ITEM;
305 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
306 setorigin(this, this.origin + '0 0 20');
308
310 WaypointSprite_SpawnFixed(WP_DomNeut, this.origin + '0 0 32', this, sprite, RADARICON_DOMPOINT);
311}
312
315{
317 for (int i = 1; i <= AVAILABLE_TEAMS; ++i)
318 {
320 }
321 IL_EACH(g_dompoints, true,
322 {
324 if (!Entity_HasValidTeam(it.goalentity))
325 {
326 continue;
327 }
328 entity team_ = Entity_GetTeam(it.goalentity);
329 int num_control_points = Team_GetNumberOfOwnedItems(team_);
330 ++num_control_points;
331 Team_SetNumberOfOwnedItems(team_, num_control_points);
332 });
333}
334
336{
338 {
339 Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_ROUND_OVER);
340 Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ROUND_OVER);
341
342 game_stopped = true;
344 return true;
345 }
346
349 if (winner_team == -1)
350 return 0;
351
352 if(winner_team > 0)
353 {
354 Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_WIN));
355 Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(winner_team, INFO_ROUND_TEAM_WIN));
356 TeamScore_AddToTeam(winner_team, ST_DOM_CAPS, +1);
357 }
358
359 game_stopped = true;
361
362 return true;
363}
364
366{
367 return true;
368}
369
371{
372 FOREACH_CLIENT(IS_PLAYER(it), { it.player_blocked = false; });
373}
374
375//go to best items, or control points you don't own
376void havocbot_goalrating_controlpoints(entity this, float ratingscale, vector org, float sradius)
377{
378 IL_EACH(g_dompoints, vdist((((it.absmin + it.absmax) * 0.5) - org), <, sradius),
379 {
380 if(it.cnt > -1) // this is just being fought
381 navigation_routerating(this, it, ratingscale, 5000);
382 else if(it.goalentity.cnt == 0) // unclaimed
383 navigation_routerating(this, it, ratingscale, 5000);
384 else if(it.goalentity.team != this.team) // other team's point
385 navigation_routerating(this, it, ratingscale, 5000);
386 });
387}
388
390{
391 if(IS_DEAD(this))
392 return;
393
395 {
397 havocbot_goalrating_controlpoints(this, 10000, this.origin, 15000);
398 havocbot_goalrating_items(this, 20000, this.origin, 8000);
399 //havocbot_goalrating_enemyplayers(this, 1500, this.origin, 2000);
400 havocbot_goalrating_waypoints(this, 1, this.origin, 3000);
402
404 }
405}
406
407MUTATOR_HOOKFUNCTION(dom, reset_map_players)
408{
409 total_pps = 0, pps_red = 0, pps_blue = 0, pps_yellow = 0, pps_pink = 0;
410 FOREACH_CLIENT(true, {
411 if (IS_PLAYER(it))
412 {
415 it.player_blocked = 1;
416 }
417 if(IS_REAL_CLIENT(it))
418 set_dom_state(it);
419 });
420 return true;
421}
422
423MUTATOR_HOOKFUNCTION(dom, PlayerSpawn)
424{
425 entity player = M_ARGV(0, entity);
426
428 player.player_blocked = !round_handler_IsRoundStarted();
429}
430
432{
433 entity player = M_ARGV(0, entity);
434
435 set_dom_state(player);
436}
437
438MUTATOR_HOOKFUNCTION(dom, HavocBot_ChooseRole)
439{
440 entity bot = M_ARGV(0, entity);
441
442 bot.havocbot_role = havocbot_role_dom;
443 return true;
444}
445
446/*QUAKED spawnfunc_dom_controlpoint (0 .5 .8) (-16 -16 -24) (16 16 32)
447Control point for Domination gameplay.
448*/
449spawnfunc(dom_controlpoint)
450{
451 if(!g_domination)
452 {
453 delete(this);
454 return;
455 }
457 this.nextthink = time + 0.1;
458 this.reset = dom_controlpoint_setup;
459
460 if(!this.scale)
461 this.scale = 0.6;
462
463 this.effects |= EF_LOWPRECISION;
465 this.effects |= EF_FULLBRIGHT;
466
467 IL_PUSH(g_dompoints, this);
468}
469
470 // Quake Live CP
471/*QUAKED team_dom_point (0 .2 1) (-16 -16 0) (16 16 88)
472Domination capture point.
473-------- KEYS --------
474identifier : Set to 1, 2, or 3 to match to point 'A', 'B', or 'C'.
475count : Adjust the range of the capture point (in units, eg: 64, 128... etc).
476target : Target name for multiple info_player_deathmatch entities (to allow spawning near that particular dom point).
477-------- NOTES --------
478Do not assign a 'gametype' key to this item. It is used in all four team gametypes. The game will call for it as needed.
479-------- MODEL FOR RADIANT ONLY - DO NOT SET THIS AS A KEY --------
480model="models/powerups/domination/dompoint.md3"
481*/
482spawnfunc(team_dom_point)
483{
484 spawnfunc_dom_controlpoint(this);
485}
486
487/*QUAKED spawnfunc_dom_team (0 .5 .8) (-32 -32 -24) (32 32 32)
488Team declaration for Domination gameplay, this allows you to decide what team
489names and control point models are used in your map.
490
491Note: If you use spawnfunc_dom_team entities you must define at least 3 and only two
492can have netname set! The nameless team owns all control points at start.
493
494Keys:
495"netname"
496 Name of the team (for example Red Team, Blue Team, Green Team, Yellow Team, Life, Death, etc)
497"cnt"
498 Scoreboard color of the team (for example 4 is red and 13 is blue)
499"model"
500 Model to use for control points owned by this team (for example
501 "progs/b_g_key.mdl" is a gold keycard, and "progs/b_s_key.mdl" is a silver
502 keycard)
503"skin"
504 Skin of the model to use (for team skins on a single model)
505"noise"
506 Sound to play when this team captures a point.
507 (this is a localized sound, like a small alarm or other effect)
508"noise1"
509 Narrator speech to play when this team captures a point.
510 (this is a global sound, like "Red team has captured a control point")
511*/
512
513spawnfunc(dom_team)
514{
516 {
517 delete(this);
518 return;
519 }
520 precache_model(this.model);
521 if (this.noise != "")
522 precache_sound(this.noise);
523 if (this.noise1 != "")
525 _setmodel(this, this.model); // precision not needed
526 this.mdl = this.model;
527 this.dmg = this.modelindex;
528 this.model = "";
529 this.modelindex = 0;
530 // this would have to be changed if used in quakeworld
531 if(this.cnt)
532 this.team = this.cnt + 1; // WHY are these different anyway?
533}
534
535// scoreboard setup
537{
539 {
541 field_team(ST_DOM_CAPS, "caps", SFL_SORT_PRIO_PRIMARY);
542 field(SP_DOM_TAKES, "takes", 0);
543 });
544 }
545 else
546 {
547 float sp_domticks, sp_score;
548 sp_score = sp_domticks = 0;
550 sp_domticks = SFL_SORT_PRIO_PRIMARY;
551 else
552 sp_score = SFL_SORT_PRIO_PRIMARY;
553 GameRules_scoring(teams, sp_score, sp_score, {
554 field_team(ST_DOM_TICKS, "ticks", sp_domticks);
555 field(SP_DOM_TICKS, "ticks", sp_domticks);
556 field(SP_DOM_TAKES, "takes", 0);
557 });
558 }
559}
560
561// code from here on is just to support maps that don't have control point and team entities
562void dom_spawnteam(string teamname, float teamcolor, string pointmodel, float pointskin, Sound capsound, string capnarration, string capmessage)
563{
564 TC(Sound, capsound);
565 entity e = new_pure(dom_team);
566 e.netname = strzone(teamname);
567 e.cnt = teamcolor;
568 e.model = pointmodel;
569 e.skin = pointskin;
570 e.noise = strzone(Sound_fixpath(capsound));
571 e.noise1 = strzone(capnarration);
572 e.message = strzone(capmessage);
573
574 // this code is identical to spawnfunc_dom_team
575 _setmodel(e, e.model); // precision not needed
576 e.mdl = e.model;
577 e.dmg = e.modelindex;
578 e.model = "";
579 e.modelindex = 0;
580 // this would have to be changed if used in quakeworld
581 e.team = e.cnt + 1;
582
583 //eprint(e);
584}
585
587{
588 entity e = spawn();
589 setthink(e, spawnfunc_dom_controlpoint);
590 e.nextthink = time;
591 setorigin(e, org);
592 spawnfunc_dom_controlpoint(e);
593}
594
595// spawn some default teams if the map is not set up for domination
597{
598 TC(int, teams);
599 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");
600 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");
601 if(teams & BIT(2))
602 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");
603 if(teams & BIT(3))
604 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");
605 dom_spawnteam("", 0, "models/domination/dom_unclaimed.md3", 0, SND_Null, "", "");
606}
607
608void dom_DelayedInit(entity this) // Do this check with a delay so we can wait for teams to be set up.
609{
610 int domination_teams = 0;
611
613 {
614 entity head = findchain(classname, "dom_team");
615 while (head)
616 {
617 if (Team_IsValidTeam(head.team))
618 domination_teams |= Team_TeamToBit(head.team);
619 head = head.chain;
620 }
621 }
622 // if no teams are found, spawn defaults
623 if (!domination_teams)
624 {
625 LOG_TRACE("No \"dom_team\" entities found on this map, creating them anyway.");
627 domination_teams = BITS(bound(2, domination_teams, 4));
628 dom_spawnteams(domination_teams);
629 }
630
632
633 ScoreRules_dom(domination_teams);
634
636 {
639 }
640}
641
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:244
#define IS_PLAYER(s)
Definition player.qh:242
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:86
const int FL_ITEM
Definition constants.qh:69
string classname
float flags
const float SOLID_TRIGGER
float modelindex
const float EF_FULLBRIGHT
float effects
float time
float nextthink
vector origin
float solid
#define spawn
float EF_LOWPRECISION
void Send_Effect_Core(entity eff, vector eff_loc, vector eff_vel, int eff_cnt, vector eff_col_min, vector eff_col_max, float eff_alpha_min, float eff_alpha_max, float eff_alpha_fade, entity ignore)
Definition all.qc:74
model
Definition ent_cs.qc:164
skin
Definition ent_cs.qc:168
int frags
Definition ent_cs.qh:67
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:242
#define PutClientInServer
Definition _all.inc:250
#define TC(T, sym)
Definition _all.inc:82
#define STAT(...)
Definition stats.qh:94
#define LOG_TRACE(...)
Definition log.qh:74
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)
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:1500
#define APP_TEAM_NUM(num, prefix)
Definition all.qh:88
#define new_pure(class)
purely logical entities (not linked to the area grid)
Definition oo.qh:66
#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:108
#define AVAILABLE_TEAMS
Number of teams that exist currently.
#define setthink(e, f)
vector
Definition self.qh:96
vector org
Definition self.qh:96
entity entity toucher
Definition self.qh:76
#define settouch(e, f)
Definition self.qh:77
#define IS_INDEPENDENT_PLAYER(e)
Definition client.qh:312
IntrusiveList g_items
Definition items.qh:119
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:107
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:152
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_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:152
entity Entity_GetTeam(entity this)
Returns the team entity of the given entity.
Definition teamplay.qc:215
void Team_SetNumberOfOwnedItems(entity team_ent, int number)
Sets the number of items owned by a team.
Definition teamplay.qc:172
int Team_GetNumberOfOwnedItems(entity team_ent)
Returns the number of items owned by a team.
Definition teamplay.qc:167
bool Entity_HasValidTeam(entity this)
Returns whether the given entity belongs to a valid team.
Definition teamplay.qc:205
entity Team_GetTeamFromIndex(int index)
Returns the global team entity at the given index.
Definition teamplay.qc:86
int teamplay_bitmask
The set of currently available teams (AVAILABLE_TEAMS is the number of them).
Definition teamplay.qh:18
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
vector Team_ColorRGB(int teamid)
Definition teams.qh:76
const int NUM_TEAM_3
Definition teams.qh:15
#define Team_ColoredFullName(teamid)
Definition teams.qh:232
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:52
#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:2425
void InitializeEntity(entity e, void(entity this) func, int order)
Definition world.qc:2227