Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
sv_clanarena.qc
Go to the documentation of this file.
1#include "sv_clanarena.qh"
2
6
14
16
18{
19 total_players = 0;
20 for (int i = 1; i <= NUM_TEAMS; ++i)
21 {
23 }
25 {
27 if (IS_DEAD(it))
28 {
29 continue;
30 }
31 entity team_ = Entity_GetTeam(it);
32 int num_alive = Team_GetNumberOfAlivePlayers(team_);
33 ++num_alive;
34 Team_SetNumberOfAlivePlayers(team_, num_alive);
35 });
37 {
42 });
43}
44
46{
47 //bprint("PreventStalemate running\n");
48
49 // g_ca_prevent_stalemate:
50 // Run survivor count check with 1 aka bit 0b0001
51 // Run total health check with 2 aka bit 0b0010
52 // With a value like 3 which has both bits both are ran
53
54 bool prevent_stalemate_by_survivors = (autocvar_g_ca_prevent_stalemate & BIT(0));
55 bool prevent_stalemate_by_health = (autocvar_g_ca_prevent_stalemate & BIT(1));
56
57 // Check which team has more alive players
58 if (prevent_stalemate_by_survivors)
59 {
60 int winnerTeam = 0;
61 int secondTeam = 0;
62
63 for(int i = 1; i <= AVAILABLE_TEAMS; ++i)
64 {
66 {
67 secondTeam = winnerTeam;
68 winnerTeam = Team_IndexToTeam(i);
69 }
70 else
71 {
73 secondTeam = Team_IndexToTeam(i);
74 }
75 }
76
78 {
79 bprint(sprintf("Stalemate broken by alive players. Best team: %s%s (%d)^7 - Trailing team: %s%s (%d)\n",
80 Team_ColorCode(winnerTeam), Team_ColorName(winnerTeam), Team_GetNumberOfAlivePlayers(Team_GetTeam(winnerTeam)),
81 Team_ColorCode(secondTeam), Team_ColorName(secondTeam), Team_GetNumberOfAlivePlayers(Team_GetTeam(secondTeam))));
82 return winnerTeam;
83 }
84 }
85
86 // Check which team has more health
87 if (prevent_stalemate_by_health)
88 {
89 int winnerTeam = 0;
90 int secondTeam = 0;
91 int winnerTeamHealth = 0;
92 int secondTeamHealth = 0;
93 int teamIndex, teamHealth;
94
95 for(int i = 1; i <= AVAILABLE_TEAMS; ++i)
96 {
97 teamIndex = i;
98 teamHealth = 0;
99
100 // Add up health for the players in this team
101 FOREACH_CLIENT(IS_PLAYER(it) && Entity_HasValidTeam(it) && it.team == Team_IndexToTeam(teamIndex),
102 {
103 if (IS_DEAD(it))
104 continue;
105 teamHealth += floor(GetResource(it, RES_HEALTH)) + floor(GetResource(it, RES_ARMOR));
106 });
107
108 // Round the resulting team health just in case
109 teamHealth = rint(teamHealth);
110
111 // Set the winner teams
112 if(!winnerTeam || teamHealth > winnerTeamHealth)
113 {
114 secondTeam = winnerTeam;
115 secondTeamHealth = winnerTeamHealth;
116 winnerTeam = Team_IndexToTeam(i);
117 winnerTeamHealth = teamHealth;
118 }
119 else
120 {
121 if(!secondTeam || teamHealth > secondTeamHealth)
122 {
123 secondTeam = Team_IndexToTeam(i);
124 secondTeamHealth = teamHealth;
125 }
126 }
127 }
128
129 if(winnerTeamHealth != secondTeamHealth)
130 {
131 bprint(sprintf("Stalemate broken by team health. Best team: %s%s (%d)^7 - Trailing team: %s%s (%d)\n",
132 Team_ColorCode(winnerTeam), Team_ColorName(winnerTeam), winnerTeamHealth,
133 Team_ColorCode(secondTeam), Team_ColorName(secondTeam), secondTeamHealth));
134 return winnerTeam;
135 }
136 }
137
138 return -2; // Equality. Can't avoid the stalemate.
139}
140
142{
143 int winner_team = 0;
144
146 {
147 // attempt to prevent stalemate by survivor count AND/OR total team health?
148 bool prevent_stalemate_by_survivors = (autocvar_g_ca_prevent_stalemate & BIT(0));
149 bool prevent_stalemate_by_health = (autocvar_g_ca_prevent_stalemate & BIT(1));
150
151 if(prevent_stalemate_by_survivors || prevent_stalemate_by_health)
152 winner_team = CA_PreventStalemate();
153 else
154 winner_team = -2;
155 }
156
158 if (!winner_team)
159 winner_team = Team_GetWinnerAliveTeam();
160 if (!winner_team)
161 {
162 // Dr. Jaska:
163 // reset delay time here only for consistency
164 // CA players currently have no known ways to resurrect
166 return 0;
167 }
168
169 // delay round ending a bit
172 && round_handler_GetEndTime() - time > 0) // don't delay past timelimit
173 {
175 {
177 return 0;
178 }
180 {
181 return 0;
182 }
183 }
184
185 if(winner_team > 0)
186 {
187 Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_WIN));
188 Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(winner_team, INFO_ROUND_TEAM_WIN));
189 TeamScore_AddToTeam(winner_team, ST_CA_ROUNDS, +1);
190 }
191 else if(winner_team == -1)
192 {
193 Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_ROUND_TIED);
194 Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ROUND_TIED);
195 }
196 else if(winner_team == -2)
197 {
198 Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_ROUND_OVER);
199 Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ROUND_OVER);
200 }
201
202 allowed_to_spawn = false;
203 game_stopped = true;
205
208 });
209
210 return 1;
211}
212
214{
216 if (!warmup_stage)
217 FOREACH_CLIENT(IS_PLAYER(it), it.prev_team = it.team);
218}
219
221{
222 static int prev_missing_teams_mask;
223 allowed_to_spawn = true;
227 return true;
228 if(total_players == 0)
229 return false;
230 for (int i = 1; i <= NUM_TEAMS; ++i)
231 {
232 if ((ca_teams & Team_IndexToBit(i)) &&
234 {
236 }
237 }
238 if(prev_missing_teams_mask != missing_teams_mask)
239 prev_missing_teams_mask = missing_teams_mask;
240 return false;
241}
242
244{
245 if(INGAME_JOINED(e) && (IS_DEAD(e) || e.frags == FRAGS_PLAYER_OUT_OF_GAME))
246 return true;
247 if(INGAME_JOINING(e))
248 return true;
249 return false;
250}
251
254{
255 if (SAME_TEAM(start, player)) return start;
256 // continue from current player
257 for (entity e = start; (e = find(e, classname, STR_PLAYER)); )
258 {
259 if (SAME_TEAM(player, e)) return e;
260 }
261 // restart from the beginning
262 for (entity e = NULL; (e = find(e, classname, STR_PLAYER)); )
263 {
264 if (SAME_TEAM(player, e)) return e;
265 }
266 return start;
267}
268
269
270// field where the decimal part of SCORE is accumulated (shared with other gametypes)
272MUTATOR_HOOKFUNCTION(ca, PlayerSpawn)
273{
274 entity player = M_ARGV(0, entity);
275
277 if (time <= game_starttime) // reset on game restart, not on round start
278 player.float2int_decimal_fld = 0;
279 if (!warmup_stage)
280 eliminatedPlayers.SendFlags |= 1;
281}
282
283MUTATOR_HOOKFUNCTION(ca, ForbidSpawn)
284{
285 entity player = M_ARGV(0, entity);
286
287 // spectators / observers that weren't playing can join; they are
288 // immediately forced to observe in the PutClientInServer hook
289 // this way they are put in a team and can play in the next round
290 if (!allowed_to_spawn && INGAME(player))
291 return true;
292 return false;
293}
294
296{
297 entity player = M_ARGV(0, entity);
298
299 if (!allowed_to_spawn && IS_PLAYER(player)) // this is true even when player is trying to join
300 {
301 TRANSMUTE(Observer, player);
302 if (CS(player).jointime != time && !INGAME(player)) // not when connecting
303 {
305 Send_Notification(NOTIF_ONE_ONLY, player, MSG_INFO, INFO_CA_JOIN_LATE);
306 }
307 }
308
309 if (!warmup_stage)
310 eliminatedPlayers.SendFlags |= 1;
311}
312
313MUTATOR_HOOKFUNCTION(ca, reset_map_players)
314{
317 // we can avoid sending observe_blocked_if_eliminated to all clients here (with ClientData_Touch)
318 // since it will get sent whenever the client spectates someone anyway
319
320 FOREACH_CLIENT(true, {
321 CS(it).killcount = 0;
322 if (INGAME(it) || IS_BOT_CLIENT(it))
323 {
324 TRANSMUTE(Player, it);
327 }
328 it.prev_team = 0;
329 });
330 return true;
331}
332
333MUTATOR_HOOKFUNCTION(ca, reset_map_global)
334{
335 allowed_to_spawn = true;
336 return true;
337}
338
339MUTATOR_HOOKFUNCTION(ca, MatchEnd_BeforeScores)
340{
342 return true;
343}
344
350
352{
353 entity last_pl = NULL;
354 FOREACH_CLIENT(IS_PLAYER(it) && it != this, {
355 if (!IS_DEAD(it) && SAME_TEAM(this, it))
356 {
357 if (!last_pl)
358 last_pl = it;
359 else
360 return NULL;
361 }
362 });
363 return last_pl;
364}
365
367{
369 {
370 entity pl = ca_LastPlayerForTeam(this);
371 if (pl)
372 Send_Notification(NOTIF_ONE, pl, MSG_CENTER, CENTER_ALONE);
373 }
374}
375
376MUTATOR_HOOKFUNCTION(ca, PlayerDies)
377{
379
381 if (!allowed_to_spawn)
382 {
383 frag_target.respawn_flags = RESPAWN_SILENT;
384 // prevent unwanted sudden rejoin as spectator and movement of spectator camera
385 frag_target.respawn_time = time + 2;
386 }
387 frag_target.respawn_flags |= RESPAWN_FORCE;
388 if (!warmup_stage)
389 eliminatedPlayers.SendFlags |= 1;
390 return true;
391}
392
393
395{
396 entity player = M_ARGV(0, entity);
397
398 if (IS_PLAYER(player) && !IS_DEAD(player))
400 return true;
401}
402
403MUTATOR_HOOKFUNCTION(ca, MakePlayerObserver)
404{
405 entity player = M_ARGV(0, entity);
406
407 bool is_forced = M_ARGV(1, bool);
408 if (is_forced && INGAME(player))
409 INGAME_STATUS_CLEAR(player);
410
411 if (IS_PLAYER(player) && !IS_DEAD(player))
413 if (player.killindicator_teamchange == -2) // player wants to spectate
414 {
415 entcs_update_players(player);
416 INGAME_STATUS_CLEAR(player);
417 }
418 if (INGAME(player))
419 {
420 player.frags = FRAGS_PLAYER_OUT_OF_GAME;
421 player.would_spectate = observe_blocked_if_eliminated; // if blocked from observing force to spectate now
422 }
423 if (!warmup_stage)
424 eliminatedPlayers.SendFlags |= 1;
425 if (!INGAME(player))
426 return false; // allow team reset
427 return true; // prevent team reset
428}
429
430MUTATOR_HOOKFUNCTION(ca, ForbidThrowCurrentWeapon)
431{
432 return true;
433}
434
436{
437 M_ARGV(2, float) = 0; // score will be given to the winner team when the round ends
438 return true;
439}
440
455
456MUTATOR_HOOKFUNCTION(ca, Damage_Calculate)
457{
458 entity frag_attacker = M_ARGV(1, entity);
460 float frag_deathtype = M_ARGV(3, float);
461 float frag_damage = M_ARGV(4, float);
462 float frag_mirrordamage = M_ARGV(5, float);
463
465 if (!IS_DEAD(frag_target))
466 if (frag_target == frag_attacker || SAME_TEAM(frag_target, frag_attacker) || frag_deathtype == DEATH_FALL.m_id)
467 frag_damage = 0;
468
469 frag_mirrordamage = 0;
470
471 M_ARGV(4, float) = frag_damage;
472 M_ARGV(5, float) = frag_mirrordamage;
473}
474
475MUTATOR_HOOKFUNCTION(ca, FilterItem)
476{
477 entity item = M_ARGV(0, entity);
478
479 if (autocvar_g_powerups <= 0)
480 if (item.itemdef.instanceOfPowerup)
481 return true;
482
484 return true;
485}
486
487MUTATOR_HOOKFUNCTION(ca, PlayerDamage_SplitHealthArmor)
488{
490 return;
491
492 entity frag_attacker = M_ARGV(1, entity);
494 float frag_deathtype = M_ARGV(6, float);
495 float frag_damage = M_ARGV(7, float);
496 float damage_take = bound(0, M_ARGV(4, float), GetResource(frag_target, RES_HEALTH));
497 float damage_save = bound(0, M_ARGV(5, float), GetResource(frag_target, RES_ARMOR));
498
499 float excess = max(0, frag_damage - damage_take - damage_save);
500
501 if (autocvar_g_ca_damage2score <= 0 || frag_damage - excess == 0) return;
502
503 entity scorer = NULL;
504 float scorer_damage = 0;
505
506 if (IS_PLAYER(frag_attacker))
507 {
508 if (DIFF_TEAM(frag_target, frag_attacker))
509 scorer_damage = frag_damage - excess;
510 else // friendly fire
511 scorer_damage = -(frag_damage - excess);
512
513 scorer = frag_attacker;
514 }
515 else
516 {
517 //handle (environmental hazard) suiciding, check first if player has a registered attacker who most likely pushed them there to avoid punishing pushed players as pushers are already rewarded
518 //deathtypes:
519 //kill = suicide, drown = drown in water/liquid, hurttrigger = out of the map void or hurt triggers inside maps like electric sparks
520 //camp = campcheck, lava = lava, slime = slime
521 //team change / rebalance suicides are currently not included
522 if (frag_deathtype == DEATH_KILL.m_id ||
523 frag_deathtype == DEATH_DROWN.m_id ||
524 frag_deathtype == DEATH_HURTTRIGGER.m_id ||
525 frag_deathtype == DEATH_CAMP.m_id ||
526 frag_deathtype == DEATH_LAVA.m_id ||
527 frag_deathtype == DEATH_SLIME.m_id ||
528 frag_deathtype == DEATH_SWAMP.m_id)
529 {
530 scorer_damage = -(frag_damage - excess);
531 scorer = frag_target;
532 }
533 }
534
535 if (scorer)
537}
538
539MUTATOR_HOOKFUNCTION(ca, CalculateRespawnTime)
540{
541 // no respawn calculations needed, player is forced to spectate anyway
542 return true;
543}
544
545MUTATOR_HOOKFUNCTION(ca, PlayerRegen)
546{
547 // no regeneration in CA
548 return true;
549}
550
551MUTATOR_HOOKFUNCTION(ca, Scores_CountFragsRemaining)
552{
553 // announce remaining frags
554 return true;
555}
556
558{
559 entity client = M_ARGV(0, entity);
560 entity targ = M_ARGV(1, entity);
561
562 if (g_ca_spectate_enemies != 1 && INGAME(client))
563 if (DIFF_TEAM(targ, client))
564 return true;
565}
566
568{
569 entity client = M_ARGV(0, entity);
570
571 if (g_ca_spectate_enemies != 1 && INGAME(client)
573 {
574 entity targ = M_ARGV(1, entity);
575 M_ARGV(1, entity) = CA_SpectateNext(client, targ);
576 return true;
577 }
578}
579
581{
582 entity client = M_ARGV(0, entity);
583 entity targ = M_ARGV(1, entity);
584 entity first = M_ARGV(2, entity);
585
586 if (g_ca_spectate_enemies != 1 && INGAME(client)
588 {
589 do { targ = targ.chain; }
590 while(targ && DIFF_TEAM(targ, client));
591
592 if (!targ)
593 {
594 for (targ = first; targ && DIFF_TEAM(targ, client); targ = targ.chain);
595
596 if (targ == client.enemy)
597 return MUT_SPECPREV_RETURN;
598 }
599 }
600 else
602
603 M_ARGV(1, entity) = targ;
604
605 return MUT_SPECPREV_FOUND;
606}
607
609{
611 if (IS_PLAYER(it) || INGAME_JOINED(it))
612 ++M_ARGV(0, int);
613 ++M_ARGV(1, int);
614 });
615 return true;
616}
617
618MUTATOR_HOOKFUNCTION(ca, ClientCommand_Spectate)
619{
620 entity player = M_ARGV(0, entity);
621
622 if (INGAME(player))
623 {
624 // they're going to spec, we can do other checks
625 if (autocvar_sv_spectate && (IS_SPEC(player) || IS_OBSERVER(player)))
626 Send_Notification(NOTIF_ONE_ONLY, player, MSG_INFO, INFO_CA_LEAVE);
627 return MUT_SPECCMD_FORCE;
628 }
629
631}
632
633MUTATOR_HOOKFUNCTION(ca, SetWeaponArena)
634{
635 if (M_ARGV(0, string) == "0" || M_ARGV(0, string) == "")
637}
638
639MUTATOR_HOOKFUNCTION(ca, SV_ParseServerCommand)
640{
641 string cmd_name = M_ARGV(0, string);
642 if (cmd_name == "shuffleteams")
644 return false;
645}
const int CBC_ORDER_FIRST
Definition base.qh:10
#define MUTATOR_HOOKFUNCTION(...)
Definition base.qh:335
const int CBC_ORDER_EXCLUSIVE
Definition base.qh:12
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
Definition bits.qh:8
#define boolean(value)
Definition bool.qh:9
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
bool warmup_stage
Definition main.qh:120
const int IT_UNLIMITED_AMMO
Definition item.qh:23
const int IT_UNLIMITED_SUPERWEAPONS
Definition item.qh:24
#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
int missing_teams_mask
Definition stats.qh:85
float game_starttime
Definition stats.qh:82
float game_stopped
Definition stats.qh:81
const int FRAGS_PLAYER_OUT_OF_GAME
Definition constants.qh:5
string classname
float time
entity eliminatedPlayers
Definition elimination.qh:3
RES_ARMOR
Definition ent_cs.qc:130
void entcs_update_players(entity player)
Definition ent_cs.qc:183
#define PutClientInServer
Definition _all.inc:246
#define ClientDisconnect
Definition _all.inc:242
#define STAT(...)
Definition stats.qh:82
string cmd_name
Definition events.qh:12
float bound(float min, float value, float max)
float cvar(string name)
entity find(entity start,.string field, string match)
void bprint(string text,...)
float min(float f,...)
float rint(float f)
float floor(float f)
float max(float f,...)
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 TRANSMUTE(cname, this,...)
Definition oo.qh:136
#define NULL
Definition post.qh:14
void round_handler_Init(float the_delay, float the_count, float the_round_timelimit)
#define round_handler_IsActive()
#define round_handler_GetEndTime()
#define round_handler_SetEndDelayTime(t)
#define round_handler_GetEndDelayTime()
#define round_handler_IsRoundStarted()
#define round_handler_ResetEndDelayTime()
float TeamScore_AddToTeam(int t, float scorefield, float score)
Adds a score to the given team.
Definition scores.qc:107
int NumTeams(int teams)
#define AVAILABLE_TEAMS
bool SpectateSet(entity this)
Definition client.qc:1879
bool SpectateNext(entity this)
Definition client.qc:1981
bool SpectatePrev(entity this)
Definition client.qc:1995
const int RESPAWN_SILENT
Definition client.qh:327
bool autocvar_sv_spectate
Definition client.qh:57
float jointime
Definition client.qh:66
const int RESPAWN_FORCE
Definition client.qh:326
int autocvar_g_pickup_items
Definition items.qh:10
@ MUT_SPECPREV_RETURN
Definition events.qh:985
@ MUT_SPECPREV_CONTINUE
Definition events.qh:984
@ MUT_SPECPREV_FOUND
Definition events.qh:986
@ MUT_SPECCMD_FORCE
Definition events.qh:1006
@ MUT_SPECCMD_CONTINUE
Definition events.qh:1004
ClientState CS(Client this)
Definition state.qh:47
float autocvar_g_ca_start_ammo_rockets
float autocvar_g_ca_start_ammo_cells
float autocvar_g_ca_damage2score
float autocvar_g_ca_start_armor
void CA_RoundStart()
float autocvar_g_ca_start_ammo_nails
float autocvar_g_ca_start_health
float autocvar_g_ca_start_ammo_fuel
bool CA_CheckTeams()
void ca_LastPlayerForTeam_Notify(entity this)
float float2int_decimal_fld
void CA_count_alive_players()
entity CA_SpectateNext(entity player, entity start)
Returns next available player to spectate if g_ca_spectate_enemies == 0.
int autocvar_g_ca_prevent_stalemate
float CA_CheckWinner()
entity ca_LastPlayerForTeam(entity this)
bool ca_isEliminated(entity e)
float autocvar_g_ca_start_ammo_shells
int prev_team
float autocvar_g_ca_round_enddelay
int CA_PreventStalemate()
bool g_ca_spectate_enemies
bool allowed_to_spawn
float autocvar_g_ca_round_timelimit
const int ST_CA_ROUNDS
string autocvar_g_ca_weaponarena
int ca_teams
int autocvar_g_ca_spectate_enemies
float autocvar_g_ca_warmup
bool shuffleteams_on_reset_map
Definition sv_cmd.qh:7
float frag_damage
Definition sv_ctf.qc:2322
entity frag_target
Definition sv_ctf.qc:2321
void nades_RemovePlayer(entity this)
Definition sv_nades.qc:885
int autocvar_g_powerups
Definition sv_powerups.qh:7
#define INGAME_STATUS_JOINED
Definition sv_rules.qh:17
#define INGAME_STATUS_JOINING
Definition sv_rules.qh:16
#define INGAME(it)
Definition sv_rules.qh:24
#define GameRules_scoring_add_float2int(client, fld, value, float_field, score_factor)
Definition sv_rules.qh:83
#define INGAME_STATUS_CLEAR(it)
Definition sv_rules.qh:22
#define INGAME_JOINED(it)
Definition sv_rules.qh:25
#define INGAME_STATUS_SET(it, s)
Definition sv_rules.qh:21
int total_players
Definition sv_rules.qh:12
#define INGAME_JOINING(it)
Definition sv_rules.qh:26
int Team_GetNumberOfAlivePlayers(entity team_ent)
Returns the number of alive players in a team.
Definition teamplay.qc:85
entity Team_GetTeam(int team_num)
Returns the global team entity that corresponds to the given TEAM_NUM value.
Definition teamplay.qc:66
entity Entity_GetTeam(entity this)
Returns the team entity of the given entity.
Definition teamplay.qc:186
int Team_GetWinnerAliveTeam()
Returns the winner team.
Definition teamplay.qc:95
bool Entity_HasValidTeam(entity this)
Returns whether the given entity belongs to a valid team.
Definition teamplay.qc:176
entity TeamBalance_CheckAllowedTeams(entity for_whom)
Checks whether the player can join teams according to global configuration and mutator settings.
Definition teamplay.qc:459
int Team_GetNumberOfAliveTeams()
Returns the number of alive teams.
Definition teamplay.qc:110
void Team_SetNumberOfAlivePlayers(entity team_ent, int number)
Sets the number of alive players in a team.
Definition teamplay.qc:90
entity Team_GetTeamFromIndex(int index)
Returns the global team entity at the given index.
Definition teamplay.qc:57
#define SAME_TEAM(a, b)
Definition teams.qh:241
string Team_ColorName(int teamid)
Definition teams.qh:89
int Team_IndexToTeam(int index)
Converts team index into team value.
Definition teams.qh:169
const int NUM_TEAMS
Number of teams in the game.
Definition teams.qh:3
#define DIFF_TEAM(a, b)
Definition teams.qh:242
int Team_IndexToBit(int index)
Converts team index into bit value that is used in team bitmasks.
Definition teams.qh:211
string Team_ColorCode(int teamid)
Definition teams.qh:63
#define IS_OBSERVER(v)
Definition utils.qh:11
#define IS_SPEC(v)
Definition utils.qh:10
const string STR_PLAYER
Definition utils.qh:5
#define IS_REAL_CLIENT(v)
Definition utils.qh:17
#define FOREACH_CLIENT(cond, body)
Definition utils.qh:50
#define IS_BOT_CLIENT(v)
want: (IS_CLIENT(v) && !IS_REAL_CLIENT(v))
Definition utils.qh:15
void MatchEnd_RestoreSpectatorAndTeamStatus(.int prev_team_field)
Definition world.qc:1350
float warmup_start_ammo_cells
Definition world.qh:105
float start_ammo_shells
Definition world.qh:84
float warmup_start_ammo_rockets
Definition world.qh:104
float warmup_start_ammo_shells
Definition world.qh:102
float start_ammo_fuel
Definition world.qh:88
int start_items
Definition world.qh:83
float warmup_start_ammo_nails
Definition world.qh:103
float start_ammo_cells
Definition world.qh:87
float warmup_start_health
Definition world.qh:107
float start_ammo_rockets
Definition world.qh:86
float start_armorvalue
Definition world.qh:97
bool observe_blocked_if_eliminated
Definition world.qh:160
float warmup_start_ammo_fuel
Definition world.qh:106
float start_health
Definition world.qh:96
float warmup_start_armorvalue
Definition world.qh:108
float start_ammo_nails
Definition world.qh:85