58 if (prevent_stalemate_by_survivors)
67 secondTeam = winnerTeam;
79 bprint(sprintf(
"Stalemate broken by alive players. Best team: %s%s (%d)^7 - Trailing team: %s%s (%d)\n",
87 if (prevent_stalemate_by_health)
91 int winnerTeamHealth = 0;
92 int secondTeamHealth = 0;
93 int teamIndex, teamHealth;
109 teamHealth =
rint(teamHealth);
112 if(!winnerTeam || teamHealth > winnerTeamHealth)
114 secondTeam = winnerTeam;
115 secondTeamHealth = winnerTeamHealth;
117 winnerTeamHealth = teamHealth;
121 if(!secondTeam || teamHealth > secondTeamHealth)
124 secondTeamHealth = teamHealth;
129 if(winnerTeamHealth != secondTeamHealth)
131 bprint(sprintf(
"Stalemate broken by team health. Best team: %s%s (%d)^7 - Trailing team: %s%s (%d)\n",
151 if(prevent_stalemate_by_survivors || prevent_stalemate_by_health)
191 else if(winner_team == -1)
196 else if(winner_team == -2)
222 static int prev_missing_teams_mask;
255 if (
SAME_TEAM(start, player))
return start;
278 player.float2int_decimal_fld = 0;
321 CS(it).killcount = 0;
407 bool is_forced =
M_ARGV(1,
bool);
408 if (is_forced &&
INGAME(player))
413 if (player.killindicator_teamchange == -2)
444 if(!
cvar(
"g_use_ammunition"))
460 float frag_deathtype =
M_ARGV(3,
float);
462 float frag_mirrordamage =
M_ARGV(5,
float);
469 frag_mirrordamage = 0;
472 M_ARGV(5,
float) = frag_mirrordamage;
480 if (item.itemdef.instanceOfPowerup)
494 float frag_deathtype =
M_ARGV(6,
float);
504 float scorer_damage = 0;
513 scorer = frag_attacker;
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)
589 do { targ = targ.chain; }
594 for (targ = first; targ &&
DIFF_TEAM(targ, client); targ = targ.chain);
596 if (targ == client.enemy)
635 if (
M_ARGV(0,
string) ==
"0" ||
M_ARGV(0,
string) ==
"")
const int CBC_ORDER_FIRST
#define MUTATOR_HOOKFUNCTION(...)
const int CBC_ORDER_EXCLUSIVE
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
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.
const int IT_UNLIMITED_AMMO
const int IT_UNLIMITED_SUPERWEAPONS
const int FRAGS_PLAYER_OUT_OF_GAME
void entcs_update_players(entity player)
#define PutClientInServer
void Send_Notification(NOTIF broadcast, entity client, MSG net_type, Notification net_name,...count)
#define APP_TEAM_NUM(num, prefix)
#define TRANSMUTE(cname, this,...)
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.
bool SpectateSet(entity this)
bool SpectateNext(entity this)
bool SpectatePrev(entity this)
bool autocvar_sv_spectate
int autocvar_g_pickup_items
ClientState CS(Client this)
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
float autocvar_g_ca_start_ammo_nails
float autocvar_g_ca_start_health
float autocvar_g_ca_start_ammo_fuel
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
entity ca_LastPlayerForTeam(entity this)
bool ca_isEliminated(entity e)
float autocvar_g_ca_start_ammo_shells
float autocvar_g_ca_round_enddelay
int CA_PreventStalemate()
bool g_ca_spectate_enemies
float autocvar_g_ca_round_timelimit
string autocvar_g_ca_weaponarena
int autocvar_g_ca_spectate_enemies
float autocvar_g_ca_warmup
bool shuffleteams_on_reset_map
void nades_RemovePlayer(entity this)
#define INGAME_STATUS_JOINED
#define INGAME_STATUS_JOINING
#define GameRules_scoring_add_float2int(client, fld, value, float_field, score_factor)
#define INGAME_STATUS_CLEAR(it)
#define INGAME_JOINED(it)
#define INGAME_STATUS_SET(it, s)
#define INGAME_JOINING(it)
int Team_GetNumberOfAlivePlayers(entity team_ent)
Returns the number of alive players in a team.
entity Team_GetTeam(int team_num)
Returns the global team entity that corresponds to the given TEAM_NUM value.
entity Entity_GetTeam(entity this)
Returns the team entity of the given entity.
int Team_GetWinnerAliveTeam()
Returns the winner team.
bool Entity_HasValidTeam(entity this)
Returns whether the given entity belongs to a valid team.
entity TeamBalance_CheckAllowedTeams(entity for_whom)
Checks whether the player can join teams according to global configuration and mutator settings.
int Team_GetNumberOfAliveTeams()
Returns the number of alive teams.
void Team_SetNumberOfAlivePlayers(entity team_ent, int number)
Sets the number of alive players in a team.
entity Team_GetTeamFromIndex(int index)
Returns the global team entity at the given index.
string Team_ColorName(int teamid)
int Team_IndexToTeam(int index)
Converts team index into team value.
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.
string Team_ColorCode(int teamid)
#define IS_REAL_CLIENT(v)
#define FOREACH_CLIENT(cond, body)
#define IS_BOT_CLIENT(v)
want: (IS_CLIENT(v) && !IS_REAL_CLIENT(v))
void MatchEnd_RestoreSpectatorAndTeamStatus(.int prev_team_field)
float warmup_start_ammo_cells
float warmup_start_ammo_rockets
float warmup_start_ammo_shells
float warmup_start_ammo_nails
float warmup_start_health
bool observe_blocked_if_eliminated
float warmup_start_ammo_fuel
float warmup_start_armorvalue