]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc
Merge branch 'master' into terencehill/glowmod_color_fix
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / domination / sv_domination.qc
1 #include "sv_domination.qh"
2
3 #include <server/client.qh>
4 #include <server/command/vote.qh>
5 #include <server/damage.qh>
6 #include <server/gamelog.qh>
7 #include <server/items/items.qh>
8 #include <server/teamplay.qh>
9 #include <server/world.qh>
10 #include <common/mapobjects/platforms.qh>
11 #include <common/mapobjects/triggers.qh>
12
13 bool g_domination;
14
15 int autocvar_g_domination_default_teams;
16 bool autocvar_g_domination_disable_frags;
17 int autocvar_g_domination_point_amt;
18 bool autocvar_g_domination_point_fullbright;
19 float autocvar_g_domination_round_timelimit;
20 float autocvar_g_domination_warmup;
21 float autocvar_g_domination_point_rate;
22 int autocvar_g_domination_teams_override;
23
24 void dom_EventLog(string mode, float team_before, entity actor) // use an alias for easy changing and quick editing later
25 {
26         if(autocvar_sv_eventlog)
27                 GameLogEcho(strcat(":dom:", mode, ":", ftos(team_before), ((actor != NULL) ? (strcat(":", ftos(actor.playerid))) : "")));
28 }
29
30 void set_dom_state(entity e)
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 >= 3)
36                 STAT(DOM_PPS_YELLOW, e) = pps_yellow;
37         if(domination_teams >= 4)
38                 STAT(DOM_PPS_PINK, e) = pps_pink;
39 }
40
41 void dompoint_captured(entity this)
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;
60         if (autocvar_g_domination_point_amt)
61                 points = autocvar_g_domination_point_amt;
62         else
63                 points = this.frags;
64         if (autocvar_g_domination_point_rate)
65                 wait_time = autocvar_g_domination_point_rate;
66         else
67                 wait_time = this.wait;
68
69         if(domination_roundbased)
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         {
114                 if (autocvar_g_domination_point_amt)
115                         points = autocvar_g_domination_point_amt;
116                 else
117                         points = it.frags;
118                 if (autocvar_g_domination_point_rate)
119                         wait_time = autocvar_g_domination_point_rate;
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));
133         WaypointSprite_Ping(this.sprite);
134
135         this.captime = time;
136
137         FOREACH_CLIENT(IS_REAL_CLIENT(it), { set_dom_state(it); });
138 }
139
140 void AnimateDomPoint(entity this)
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
153 void dompointthink(entity this)
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
169         if(autocvar_g_domination_point_rate)
170                 this.delay = time + autocvar_g_domination_point_rate;
171         else
172                 this.delay = time + this.wait;
173
174         // give credit to the team
175         // NOTE: this defaults to 0
176         if (!domination_roundbased)
177         if (this.goalentity.netname != "")
178         {
179                 if(autocvar_g_domination_point_amt)
180                         fragamt = autocvar_g_domination_point_amt;
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 he is 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
197 void dompointtouch(entity this, entity toucher)
198 {
199         if(!IS_PLAYER(toucher))
200                 return;
201         if(GetResource(toucher, RES_HEALTH) < 1)
202                 return;
203
204         if(round_handler_IsActive() && !round_handler_IsRoundStarted())
205                 return;
206
207         if(time < this.captime + 0.3)
208                 return;
209
210         // only valid teams can claim it
211         entity head = find(NULL, classname, "dom_team");
212         while (head && head.team != toucher.team)
213                 head = find(head, classname, "dom_team");
214         if (!head || head.netname == "" || head == this.goalentity)
215                 return;
216
217         // delay capture
218
219         this.team = this.goalentity.team; // this stores the PREVIOUS team!
220
221         this.cnt = toucher.team;
222         this.owner = head; // team to switch to after the delay
223         this.dmg_inflictor = toucher;
224
225         // this.state = 1;
226         // this.delay = time + cvar("g_domination_point_capturetime");
227         //this.nextthink = time + cvar("g_domination_point_capturetime");
228         //this.think = dompoint_captured;
229
230         // go to neutral team in the mean time
231         head = find(NULL, classname, "dom_team");
232         while (head && head.netname != "")
233                 head = find(head, classname, "dom_team");
234         if(head == NULL)
235                 return;
236
237         WaypointSprite_UpdateSprites(this.sprite, WP_DomNeut, WP_Null, WP_Null);
238         WaypointSprite_UpdateTeamRadar(this.sprite, RADARICON_DOMPOINT, '0 1 1');
239         WaypointSprite_Ping(this.sprite);
240
241         this.goalentity = head;
242         this.model = head.mdl;
243         this.modelindex = head.dmg;
244         this.skin = head.skin;
245
246         this.enemy = toucher; // individual player scoring
247         this.enemy_playerid = toucher.playerid;
248         dompoint_captured(this);
249 }
250
251 void dom_controlpoint_setup(entity this)
252 {
253         entity head;
254         // find the spawnfunc_dom_team representing unclaimed points
255         head = find(NULL, classname, "dom_team");
256         while(head && head.netname != "")
257                 head = find(head, classname, "dom_team");
258         if (!head)
259                 objerror(this, "no spawnfunc_dom_team with netname \"\" found\n");
260
261         // copy important properties from spawnfunc_dom_team entity
262         this.goalentity = head;
263         _setmodel(this, head.mdl); // precision already set
264         this.skin = head.skin;
265
266         this.cnt = -1;
267
268         if(this.message == "")
269                 this.message = " has captured a control point";
270
271         if(this.frags <= 0)
272                 this.frags = 1;
273         if(this.wait <= 0)
274                 this.wait = 5;
275
276         float points, waittime;
277         if (autocvar_g_domination_point_amt)
278                 points = autocvar_g_domination_point_amt;
279         else
280                 points = this.frags;
281         if (autocvar_g_domination_point_rate)
282                 waittime = autocvar_g_domination_point_rate;
283         else
284                 waittime = this.wait;
285
286         total_pps += points/waittime;
287
288         if(!this.t_width)
289                 this.t_width = 0.02; // frame animation rate
290         if(!this.t_length)
291                 this.t_length = 239; // maximum frame
292
293         setthink(this, dompointthink);
294         this.nextthink = time;
295         settouch(this, dompointtouch);
296         this.solid = SOLID_TRIGGER;
297         if(!this.flags & FL_ITEM)
298                 IL_PUSH(g_items, this);
299         this.flags = FL_ITEM;
300         setsize(this, '-32 -32 -32', '32 32 32');
301         setorigin(this, this.origin + '0 0 20');
302         droptofloor(this);
303
304         waypoint_spawnforitem(this);
305         WaypointSprite_SpawnFixed(WP_DomNeut, this.origin + '0 0 32', this, sprite, RADARICON_DOMPOINT);
306 }
307
308 int total_control_points;
309 void Domination_count_controlpoints()
310 {
311         total_control_points = 0;
312         for (int i = 1; i <= NUM_TEAMS; ++i)
313         {
314                 Team_SetNumberOfControlPoints(Team_GetTeamFromIndex(i), 0);
315         }
316         IL_EACH(g_dompoints, true,
317         {
318                 ++total_control_points;
319                 if (!Entity_HasValidTeam(it.goalentity))
320                 {
321                         continue;
322                 }
323                 entity team_ = Entity_GetTeam(it.goalentity);
324                 int num_control_points = Team_GetNumberOfControlPoints(team_);
325                 ++num_control_points;
326                 Team_SetNumberOfControlPoints(team_, num_control_points);
327         });
328 }
329
330 int Domination_GetWinnerTeam()
331 {
332         int winner_team = 0;
333         if (Team_GetNumberOfControlPoints(Team_GetTeamFromIndex(1)) ==
334                 total_control_points)
335         {
336                 winner_team = NUM_TEAM_1;
337         }
338         for (int i = 2; i <= NUM_TEAMS; ++i)
339         {
340                 if (Team_GetNumberOfControlPoints(Team_GetTeamFromIndex(i)) ==
341                         total_control_points)
342                 {
343                         if (winner_team != 0)
344                         {
345                                 return 0;
346                         }
347                         winner_team = Team_IndexToTeam(i);
348                 }
349         }
350         if (winner_team)
351         {
352                 return winner_team;
353         }
354         return -1; // no control points left?
355 }
356
357 bool Domination_CheckWinner()
358 {
359         if(round_handler_GetEndTime() > 0 && round_handler_GetEndTime() - time <= 0)
360         {
361                 Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_ROUND_OVER);
362                 Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ROUND_OVER);
363
364                 game_stopped = true;
365                 round_handler_Init(5, autocvar_g_domination_warmup, autocvar_g_domination_round_timelimit);
366                 return true;
367         }
368
369         Domination_count_controlpoints();
370
371         float winner_team = Domination_GetWinnerTeam();
372
373         if(winner_team == -1)
374                 return false;
375
376         if(winner_team > 0)
377         {
378                 Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_WIN));
379                 Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(winner_team, INFO_ROUND_TEAM_WIN));
380                 TeamScore_AddToTeam(winner_team, ST_DOM_CAPS, +1);
381         }
382         else if(winner_team == -1)
383         {
384                 Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_ROUND_TIED);
385                 Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ROUND_TIED);
386         }
387
388         game_stopped = true;
389         round_handler_Init(5, autocvar_g_domination_warmup, autocvar_g_domination_round_timelimit);
390
391         return true;
392 }
393
394 bool Domination_CheckPlayers()
395 {
396         return true;
397 }
398
399 void Domination_RoundStart()
400 {
401         FOREACH_CLIENT(IS_PLAYER(it), { it.player_blocked = false; });
402 }
403
404 //go to best items, or control points you don't own
405 void havocbot_goalrating_controlpoints(entity this, float ratingscale, vector org, float sradius)
406 {
407         IL_EACH(g_dompoints, vdist((((it.absmin + it.absmax) * 0.5) - org), <, sradius),
408         {
409                 if(it.cnt > -1) // this is just being fought
410                         navigation_routerating(this, it, ratingscale, 5000);
411                 else if(it.goalentity.cnt == 0) // unclaimed
412                         navigation_routerating(this, it, ratingscale, 5000);
413                 else if(it.goalentity.team != this.team) // other team's point
414                         navigation_routerating(this, it, ratingscale, 5000);
415         });
416 }
417
418 void havocbot_role_dom(entity this)
419 {
420         if(IS_DEAD(this))
421                 return;
422
423         if (navigation_goalrating_timeout(this))
424         {
425                 navigation_goalrating_start(this);
426                 havocbot_goalrating_controlpoints(this, 10000, this.origin, 15000);
427                 havocbot_goalrating_items(this, 20000, this.origin, 8000);
428                 //havocbot_goalrating_enemyplayers(this, 1500, this.origin, 2000);
429                 havocbot_goalrating_waypoints(this, 1, this.origin, 3000);
430                 navigation_goalrating_end(this);
431
432                 navigation_goalrating_timeout_set(this);
433         }
434 }
435
436 MUTATOR_HOOKFUNCTION(dom, TeamBalance_CheckAllowedTeams)
437 {
438         // fallback?
439         M_ARGV(0, float) = domination_teams;
440         string ret_string = "dom_team";
441
442         entity head = find(NULL, classname, ret_string);
443         while(head)
444         {
445                 if(head.netname != "")
446                 {
447                         if (Team_IsValidTeam(head.team))
448                         {
449                                 M_ARGV(0, float) |= Team_TeamToBit(head.team);
450                         }
451                 }
452
453                 head = find(head, classname, ret_string);
454         }
455
456         M_ARGV(1, string) = string_null;
457
458         return true;
459 }
460
461 MUTATOR_HOOKFUNCTION(dom, reset_map_players)
462 {
463         total_pps = 0, pps_red = 0, pps_blue = 0, pps_yellow = 0, pps_pink = 0;
464         FOREACH_CLIENT(IS_PLAYER(it), {
465                 PutClientInServer(it);
466                 if(domination_roundbased)
467                         it.player_blocked = 1;
468                 if(IS_REAL_CLIENT(it))
469                         set_dom_state(it);
470         });
471         return true;
472 }
473
474 MUTATOR_HOOKFUNCTION(dom, PlayerSpawn)
475 {
476         entity player = M_ARGV(0, entity);
477
478         if(domination_roundbased)
479                 player.player_blocked = !round_handler_IsRoundStarted();
480 }
481
482 MUTATOR_HOOKFUNCTION(dom, ClientConnect)
483 {
484         entity player = M_ARGV(0, entity);
485
486         set_dom_state(player);
487 }
488
489 MUTATOR_HOOKFUNCTION(dom, HavocBot_ChooseRole)
490 {
491         entity bot = M_ARGV(0, entity);
492
493         bot.havocbot_role = havocbot_role_dom;
494         return true;
495 }
496
497 /*QUAKED spawnfunc_dom_controlpoint (0 .5 .8) (-16 -16 -24) (16 16 32)
498 Control point for Domination gameplay.
499 */
500 spawnfunc(dom_controlpoint)
501 {
502         if(!g_domination)
503         {
504                 delete(this);
505                 return;
506         }
507         setthink(this, dom_controlpoint_setup);
508         this.nextthink = time + 0.1;
509         this.reset = dom_controlpoint_setup;
510
511         if(!this.scale)
512                 this.scale = 0.6;
513
514         this.effects = this.effects | EF_LOWPRECISION;
515         if (autocvar_g_domination_point_fullbright)
516                 this.effects |= EF_FULLBRIGHT;
517
518         IL_PUSH(g_dompoints, this);
519 }
520
521 /*QUAKED spawnfunc_dom_team (0 .5 .8) (-32 -32 -24) (32 32 32)
522 Team declaration for Domination gameplay, this allows you to decide what team
523 names and control point models are used in your map.
524
525 Note: If you use spawnfunc_dom_team entities you must define at least 3 and only two
526 can have netname set!  The nameless team owns all control points at start.
527
528 Keys:
529 "netname"
530  Name of the team (for example Red Team, Blue Team, Green Team, Yellow Team, Life, Death, etc)
531 "cnt"
532  Scoreboard color of the team (for example 4 is red and 13 is blue)
533 "model"
534  Model to use for control points owned by this team (for example
535  "progs/b_g_key.mdl" is a gold keycard, and "progs/b_s_key.mdl" is a silver
536  keycard)
537 "skin"
538  Skin of the model to use (for team skins on a single model)
539 "noise"
540  Sound to play when this team captures a point.
541  (this is a localized sound, like a small alarm or other effect)
542 "noise1"
543  Narrator speech to play when this team captures a point.
544  (this is a global sound, like "Red team has captured a control point")
545 */
546
547 spawnfunc(dom_team)
548 {
549         if(!g_domination || autocvar_g_domination_teams_override >= 2)
550         {
551                 delete(this);
552                 return;
553         }
554         precache_model(this.model);
555         if (this.noise != "")
556                 precache_sound(this.noise);
557         if (this.noise1 != "")
558                 precache_sound(this.noise1);
559         _setmodel(this, this.model); // precision not needed
560         this.mdl = this.model;
561         this.dmg = this.modelindex;
562         this.model = "";
563         this.modelindex = 0;
564         // this would have to be changed if used in quakeworld
565         if(this.cnt)
566                 this.team = this.cnt + 1; // WHY are these different anyway?
567 }
568
569 // scoreboard setup
570 void ScoreRules_dom(int teams)
571 {
572         if(domination_roundbased)
573         {
574             GameRules_scoring(teams, SFL_SORT_PRIO_PRIMARY, 0, {
575             field_team(ST_DOM_CAPS, "caps", SFL_SORT_PRIO_PRIMARY);
576             field(SP_DOM_TAKES, "takes", 0);
577             });
578         }
579         else
580         {
581                 float sp_domticks, sp_score;
582                 sp_score = sp_domticks = 0;
583                 if(autocvar_g_domination_disable_frags)
584                         sp_domticks = SFL_SORT_PRIO_PRIMARY;
585                 else
586                         sp_score = SFL_SORT_PRIO_PRIMARY;
587                 GameRules_scoring(teams, sp_score, sp_score, {
588             field_team(ST_DOM_TICKS, "ticks", sp_domticks);
589             field(SP_DOM_TICKS, "ticks", sp_domticks);
590             field(SP_DOM_TAKES, "takes", 0);
591                 });
592         }
593 }
594
595 // code from here on is just to support maps that don't have control point and team entities
596 void dom_spawnteam(string teamname, float teamcolor, string pointmodel, float pointskin, Sound capsound, string capnarration, string capmessage)
597 {
598         TC(Sound, capsound);
599         entity e = new_pure(dom_team);
600         e.netname = strzone(teamname);
601         e.cnt = teamcolor;
602         e.model = pointmodel;
603         e.skin = pointskin;
604         e.noise = strzone(Sound_fixpath(capsound));
605         e.noise1 = strzone(capnarration);
606         e.message = strzone(capmessage);
607
608         // this code is identical to spawnfunc_dom_team
609         _setmodel(e, e.model); // precision not needed
610         e.mdl = e.model;
611         e.dmg = e.modelindex;
612         e.model = "";
613         e.modelindex = 0;
614         // this would have to be changed if used in quakeworld
615         e.team = e.cnt + 1;
616
617         //eprint(e);
618 }
619
620 void dom_spawnpoint(vector org)
621 {
622         entity e = spawn();
623         setthink(e, spawnfunc_dom_controlpoint);
624         e.nextthink = time;
625         setorigin(e, org);
626         spawnfunc_dom_controlpoint(e);
627 }
628
629 // spawn some default teams if the map is not set up for domination
630 void dom_spawnteams(int teams)
631 {
632         TC(int, teams);
633         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");
634         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");
635         if(teams >= 3)
636                 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");
637         if(teams >= 4)
638                 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");
639         dom_spawnteam("", 0, "models/domination/dom_unclaimed.md3", 0, SND_Null, "", "");
640 }
641
642 void dom_DelayedInit(entity this) // Do this check with a delay so we can wait for teams to be set up.
643 {
644         // if no teams are found, spawn defaults
645         if(find(NULL, classname, "dom_team") == NULL || autocvar_g_domination_teams_override >= 2)
646         {
647                 LOG_TRACE("No \"dom_team\" entities found on this map, creating them anyway.");
648                 domination_teams = autocvar_g_domination_teams_override;
649                 if (domination_teams < 2)
650                         domination_teams = autocvar_g_domination_default_teams;
651                 domination_teams = bound(2, domination_teams, 4);
652                 dom_spawnteams(domination_teams);
653         }
654
655         entity balance = TeamBalance_CheckAllowedTeams(NULL);
656         int teams = TeamBalance_GetAllowedTeams(balance);
657         TeamBalance_Destroy(balance);
658         domination_teams = teams;
659
660         domination_roundbased = autocvar_g_domination_roundbased;
661
662         ScoreRules_dom(domination_teams);
663
664         if(domination_roundbased)
665         {
666                 round_handler_Spawn(Domination_CheckPlayers, Domination_CheckWinner, Domination_RoundStart);
667                 round_handler_Init(5, autocvar_g_domination_warmup, autocvar_g_domination_round_timelimit);
668         }
669 }
670
671 void dom_Initialize()
672 {
673         g_domination = true;
674         InitializeEntity(NULL, dom_DelayedInit, INITPRIO_GAMETYPE);
675 }