51 Send_Notification(NOTIF_ALL,
NULL, MSG_CENTER, CENTER_ROUND_OVER);
52 Send_Notification(NOTIF_ALL,
NULL, MSG_INFO, INFO_ROUND_OVER);
68 Send_Notification(NOTIF_ALL,
NULL, MSG_CENTER,
APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_WIN));
69 Send_Notification(NOTIF_ALL,
NULL, MSG_INFO,
APP_TEAM_NUM(winner_team, INFO_ROUND_TEAM_WIN));
72 else if(winner_team == -1)
74 Send_Notification(NOTIF_ALL,
NULL, MSG_CENTER, CENTER_ROUND_TIED);
75 Send_Notification(NOTIF_ALL,
NULL, MSG_INFO, INFO_ROUND_TIED);
94 static int prev_missing_teams_mask;
99 if(prev_missing_teams_mask > 0)
100 Kill_Notification(NOTIF_ALL,
NULL, MSG_CENTER, CPID_MISSING_TEAMS);
101 prev_missing_teams_mask = -1;
106 if(prev_missing_teams_mask > 0)
107 Kill_Notification(NOTIF_ALL,
NULL, MSG_CENTER, CPID_MISSING_TEAMS);
108 prev_missing_teams_mask = -1;
111 int missing_teams_mask = 0;
120 if(prev_missing_teams_mask != missing_teams_mask)
122 Send_Notification(NOTIF_ALL,
NULL, MSG_CENTER, CENTER_MISSING_TEAMS, missing_teams_mask);
123 prev_missing_teams_mask = missing_teams_mask;
140 if (
SAME_TEAM(start, player))
return start;
160 if (
time <= game_starttime)
161 player.ca_damage_counter = 0;
188 Send_Notification(NOTIF_ONE_ONLY, player, MSG_INFO, INFO_CA_JOIN_LATE);
196 CS(it).killcount = 0;
245 Send_Notification(NOTIF_ONE, pl, MSG_CENTER, CENTER_ALONE);
258 frag_target.respawn_time =
time + 2;
280 bool is_forced =
M_ARGV(1,
bool);
281 if (is_forced &&
INGAME(player))
286 if (player.killindicator_teamchange == -2)
288 entcs_update_players(player);
313 start_items &= ~(IT_UNLIMITED_AMMO | IT_UNLIMITED_SUPERWEAPONS);
314 if(!
cvar(
"g_use_ammunition"))
331 float frag_deathtype =
M_ARGV(3,
float);
332 float frag_damage =
M_ARGV(4,
float);
333 float frag_mirrordamage =
M_ARGV(5,
float);
337 if (frag_target == frag_attacker ||
SAME_TEAM(frag_target, frag_attacker) || frag_deathtype == DEATH_FALL.m_id)
340 frag_mirrordamage = 0;
342 M_ARGV(4,
float) = frag_damage;
343 M_ARGV(5,
float) = frag_mirrordamage;
351 if (item.itemdef.instanceOfPowerup)
365 float frag_deathtype =
M_ARGV(6,
float);
366 float frag_damage =
M_ARGV(7,
float);
370 float excess =
max(0, frag_damage - damage_take - damage_save);
375 float scorer_damage = 0;
379 if (
DIFF_TEAM(frag_target, frag_attacker))
380 scorer_damage = frag_damage - excess;
382 scorer_damage = -(frag_damage - excess);
384 scorer = frag_attacker;
393 if (frag_deathtype == DEATH_KILL.m_id ||
394 frag_deathtype == DEATH_DROWN.m_id ||
395 frag_deathtype == DEATH_HURTTRIGGER.m_id ||
396 frag_deathtype == DEATH_CAMP.m_id ||
397 frag_deathtype == DEATH_LAVA.m_id ||
398 frag_deathtype == DEATH_SLIME.m_id ||
399 frag_deathtype == DEATH_SWAMP.m_id)
401 scorer_damage = -(frag_damage - excess);
402 scorer = frag_target;
460 do { targ = targ.chain; }
465 for (targ = first; targ &&
DIFF_TEAM(targ, client); targ = targ.chain);
467 if (targ == client.enemy)
497 Send_Notification(NOTIF_ONE_ONLY, player, MSG_INFO, INFO_CA_LEAVE);
511 if (
M_ARGV(0,
string) ==
"0" ||
M_ARGV(0,
string) ==
"")
518 if (cmd_name ==
"shuffleteams")
const int NUM_TEAMS
Number of teams in the game.
int Team_IndexToBit(int index)
Converts team index into bit value that is used in team bitmasks.
#define APP_TEAM_NUM(num, prefix)
#define round_handler_IsActive()
#define INGAME_STATUS_SET(it, s)
const int CBC_ORDER_EXCLUSIVE
float autocvar_g_ca_start_ammo_fuel
void ca_LastPlayerForTeam_Notify(entity this)
float warmup_start_ammo_shells
#define INGAME_STATUS_JOINED
MUTATOR_HOOKFUNCTION(ca, PlayerSpawn)
float TeamScore_AddToTeam(int t, float scorefield, float score)
Adds a score to the given team.
float autocvar_g_ca_start_health
int Team_GetNumberOfAlivePlayers(entity team_ent)
Returns the number of alive players in a team.
ClientState CS(Client this)
void nades_Clear(entity player)
#define FOREACH_CLIENT(cond, body)
float autocvar_g_ca_start_ammo_rockets
#define round_handler_IsRoundStarted()
float autocvar_g_ca_start_armor
entity Entity_GetTeam(entity this)
Returns the team entity of the given entity.
float warmup_start_ammo_plasma
float autocvar_g_ca_start_ammo_nails
float autocvar_g_ca_start_ammo_plasma
#define IS_REAL_CLIENT(v)
bool Entity_HasValidTeam(entity this)
Returns whether the given entity belongs to a valid team.
bool autocvar_g_ca_spectate_enemies
bool SpectateNext(entity this)
float warmup_start_ammo_cells
void CA_count_alive_players()
float warmup_start_ammo_fuel
float autocvar_g_ca_start_ammo_shells
const int CBC_ORDER_FIRST
entity ca_LastPlayerForTeam(entity this)
void Team_SetNumberOfAlivePlayers(entity team_ent, int number)
Sets the number of alive players in a team.
float autocvar_g_ca_start_ammo_cells
#define round_handler_GetEndTime()
#define GameRules_scoring_add_float2int(client, fld, value, float_field, score_factor)
#define INGAME_STATUS_CLEAR(it)
int Team_GetNumberOfAliveTeams()
Returns the number of alive teams.
entity Team_GetTeamFromIndex(int index)
Returns the global team entity at the given index.
float warmup_start_armorvalue
entity CA_SpectateNext(entity player, entity start)
Returns next available player to spectate if g_ca_spectate_enemies == 0.
float autocvar_g_ca_round_timelimit
bool shuffleteams_on_reset_map
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
const int FRAGS_PLAYER_OUT_OF_GAME
float autocvar_g_ca_warmup
float warmup_start_ammo_rockets
string autocvar_g_ca_weaponarena
#define INGAME_JOINED(it)
#define IS_BOT_CLIENT(v)
want: (IS_CLIENT(v) && !IS_REAL_CLIENT(v))
float warmup_start_health
bool ca_isEliminated(entity e)
int Team_GetWinnerAliveTeam()
Returns the winner team.
int autocvar_g_pickup_items
entity TeamBalance_CheckAllowedTeams(entity for_whom)
Checks whether the player can join teams according to global configuration and mutator settings...
bool SpectateSet(entity this)
#define INGAME_JOINING(it)
void round_handler_Init(float the_delay, float the_count, float the_round_timelimit)
float autocvar_g_ca_damage2score
#define INGAME_STATUS_JOINING
bool SpectatePrev(entity this)
float warmup_start_ammo_nails