Xonotic
|
Go to the source code of this file.
Macros | |
#define | ColorByTeam(number) Team_IndexToTeam(number + 1) |
#define | DIFF_TEAM(a, b) (teamplay ? (a.team != b.team) : (a != b)) |
#define | FLAG_TEAM_1 CTX(_("FLAG^Red")) |
#define | FLAG_TEAM_2 CTX(_("FLAG^Blue")) |
#define | FLAG_TEAM_3 CTX(_("FLAG^Yellow")) |
#define | FLAG_TEAM_4 CTX(_("FLAG^Pink")) |
#define | GENERATOR_TEAM_1 CTX(_("GENERATOR^Red")) |
#define | GENERATOR_TEAM_2 CTX(_("GENERATOR^Blue")) |
#define | GENERATOR_TEAM_3 CTX(_("GENERATOR^Yellow")) |
#define | GENERATOR_TEAM_4 CTX(_("GENERATOR^Pink")) |
#define | KEY_TEAM_1 CTX(_("KEY^Red")) |
#define | KEY_TEAM_2 CTX(_("KEY^Blue")) |
#define | KEY_TEAM_3 CTX(_("KEY^Yellow")) |
#define | KEY_TEAM_4 CTX(_("KEY^Pink")) |
#define | NAME_NEUTRAL _("Neutral") |
#define | NAME_TEAM _("Team") |
#define | NAME_TEAM_1 CTX(_("TEAM^Red")) |
#define | NAME_TEAM_2 CTX(_("TEAM^Blue")) |
#define | NAME_TEAM_3 CTX(_("TEAM^Yellow")) |
#define | NAME_TEAM_4 CTX(_("TEAM^Pink")) |
#define | SAME_TEAM(a, b) (teamplay ? (a.team == b.team) : (a == b)) |
#define | Static_Team_ColorName_Lower(teamid) strtolower(Static_Team_ColorName(teamid)) |
#define | Static_Team_ColorName_Upper(teamid) strtoupper(Static_Team_ColorName(teamid)) |
#define | TCR(input, type, team) strreplace("^TC", COL_TEAM_##team, strreplace("^TT", strtoupper(type##_TEAM_##team), input)) |
#define | Team_ColoredFullName(teamid) strcat(Team_ColorCode(teamid), Team_ColorName(teamid), " ", NAME_TEAM, "^7") |
#define | Team_ColorName_Lower(teamid) strtolower(Team_ColorName(teamid)) |
#define | Team_ColorName_Upper(teamid) strtoupper(Team_ColorName(teamid)) |
#define | Team_FullName(teamid) strcat(Team_ColorName(teamid), " ", NAME_TEAM, "^7") |
#define | Team_IndexToColoredFullName(index) Team_ColoredFullName(Team_IndexToTeam(index)) |
#define | Team_IndexToFullName(index) Team_FullName(Team_IndexToTeam(index)) |
#define | TeamByColor(teamid) (Team_TeamToIndex(teamid) - 1) |
Functions | |
string | Static_Team_ColorName (int teamid) |
string | Team_ColorCode (int teamid) |
string | Team_ColorName (int teamid) |
vector | Team_ColorRGB (int teamid) |
float | Team_ColorToTeam (string team_color) |
int | Team_IndexToBit (int index) |
Converts team index into bit value that is used in team bitmasks. More... | |
int | Team_IndexToTeam (int index) |
Converts team index into team value. More... | |
bool | Team_IsValidIndex (int index) |
Returns whether the team index is valid. More... | |
bool | Team_IsValidTeam (int team_num) |
Returns whether team value is valid. More... | |
int | Team_TeamToBit (int team_num) |
Converts team value into bit value that is used in team bitmasks. More... | |
int | Team_TeamToIndex (int team_num) |
Converts team value into team index. More... | |
Variables | |
const string | COL_TEAM_1 = "^1" |
const string | COL_TEAM_2 = "^4" |
const string | COL_TEAM_3 = "^3" |
const string | COL_TEAM_4 = "^6" |
const int | NUM_SPECTATOR = 1337 |
const int | NUM_TEAM_1 = 5 |
const int | NUM_TEAM_2 = 14 |
const int | NUM_TEAM_3 = 13 |
const int | NUM_TEAM_4 = 10 |
const int | NUM_TEAMS = 4 |
Number of teams in the game. More... | |
const string | STATIC_NAME_TEAM_1 = "Red" |
const string | STATIC_NAME_TEAM_2 = "Blue" |
const string | STATIC_NAME_TEAM_3 = "Yellow" |
const string | STATIC_NAME_TEAM_4 = "Pink" |
#define ColorByTeam | ( | number | ) | Team_IndexToTeam(number + 1) |
Definition at line 219 of file teams.qh.
Referenced by HUD_Score_Rankings().
Definition at line 240 of file teams.qh.
Referenced by buffs_BuffModel_Customize(), CheatImpulse(), ctf_CaptureShield_CheckStatus(), ctf_FlagThink(), ctf_Handle_Capture(), ctf_Handle_Pickup(), Damage(), havocbot_ctf_teamcount(), havocbot_role_ctf_defense(), kh_KeyCarrier_waypointsprite_visible_for_player(), Monster_Move(), MUTATOR_HOOKFUNCTION(), Onslaught_CheckWinner(), onslaught_updatelinks(), PlayerDamage(), Teleport_Active(), trigger_push_touch(), and vehicles_enter().
#define NAME_NEUTRAL _("Neutral") |
Definition at line 36 of file teams.qh.
Referenced by Static_Team_ColorName(), and Team_ColorName().
#define NAME_TEAM_1 CTX(_("TEAM^Red")) |
Definition at line 31 of file teams.qh.
Referenced by Team_ColorName().
#define NAME_TEAM_2 CTX(_("TEAM^Blue")) |
Definition at line 32 of file teams.qh.
Referenced by Team_ColorName().
#define NAME_TEAM_3 CTX(_("TEAM^Yellow")) |
Definition at line 33 of file teams.qh.
Referenced by Team_ColorName().
#define NAME_TEAM_4 CTX(_("TEAM^Pink")) |
Definition at line 34 of file teams.qh.
Referenced by Team_ColorName().
Definition at line 239 of file teams.qh.
Referenced by accuracy_isgooddamage(), ca_LastPlayerForTeam(), CA_SpectateNext(), ctf_Handle_Capture(), ctf_Handle_Pickup(), ctf_Handle_Retrieve(), ctf_Immediate_Return_Allowed(), ctf_Stalemate_Customize(), Damage(), Drag(), freezetag_LastPlayerForTeam(), havocbot_ctf_reset_role(), havocbot_goalrating_ft_freeplayers(), havocbot_goalrating_ons_controlpoints_attack(), havocbot_goalrating_ons_generator_attack(), havocbot_role_ft_offense(), Monster_ValidTarget(), MUTATOR_HOOKFUNCTION(), nb_Goal_Customize(), Obituary(), ons_CaptureShield_Customize(), ons_CaptureShield_Touch(), ons_ControlPoint_Touch(), ons_Count_SelfControlPoints(), ons_GeneratorDamage(), ons_GeneratorThink(), ons_Nearest_ControlPoint(), ons_Nearest_ControlPoint_2D(), onslaught_generator_touch(), onslaught_updatelinks(), PlayerPreThink(), PlayerUseKey(), UpdatePlayerSounds(), vehicles_enter(), vehicles_locktarget(), and W_Nexball_Touch().
#define Static_Team_ColorName_Lower | ( | teamid | ) | strtolower(Static_Team_ColorName(teamid)) |
Definition at line 226 of file teams.qh.
Referenced by ctf_FlagSetup().
#define Static_Team_ColorName_Upper | ( | teamid | ) | strtoupper(Static_Team_ColorName(teamid)) |
#define Team_ColoredFullName | ( | teamid | ) | strcat(Team_ColorCode(teamid), Team_ColorName(teamid), " ", NAME_TEAM, "^7") |
Definition at line 230 of file teams.qh.
Referenced by dom_spawnteams(), GameCommand_moveplayer(), GoalTouch(), ons_GeneratorSetup(), Score_NicePrint_Team(), and WinningCondition_Assault().
#define Team_ColorName_Lower | ( | teamid | ) | strtolower(Team_ColorName(teamid)) |
#define Team_ColorName_Upper | ( | teamid | ) | strtoupper(Team_ColorName(teamid)) |
Definition at line 223 of file teams.qh.
Referenced by ctf_FlagSetup(), and NextLevel().
#define Team_FullName | ( | teamid | ) | strcat(Team_ColorName(teamid), " ", NAME_TEAM, "^7") |
#define Team_IndexToColoredFullName | ( | index | ) | Team_ColoredFullName(Team_IndexToTeam(index)) |
#define Team_IndexToFullName | ( | index | ) | Team_FullName(Team_IndexToTeam(index)) |
#define TeamByColor | ( | teamid | ) | (Team_TeamToIndex(teamid) - 1) |
Definition at line 103 of file teams.qh.
References NAME_NEUTRAL, NUM_TEAM_1, NUM_TEAM_2, NUM_TEAM_3, NUM_TEAM_4, STATIC_NAME_TEAM_1, STATIC_NAME_TEAM_2, STATIC_NAME_TEAM_3, and STATIC_NAME_TEAM_4.
Referenced by Get_Notif_CvarName().
Definition at line 63 of file teams.qh.
References COL_TEAM_1, COL_TEAM_2, COL_TEAM_3, COL_TEAM_4, NUM_TEAM_1, NUM_TEAM_2, NUM_TEAM_3, and NUM_TEAM_4.
Referenced by ctf_FlagSetup(), ctf_Handle_Pickup(), FindConnectedComponent(), NextLevel(), and Say().
Definition at line 89 of file teams.qh.
References NAME_NEUTRAL, NAME_TEAM_1, NAME_TEAM_2, NAME_TEAM_3, NAME_TEAM_4, NUM_TEAM_1, NUM_TEAM_2, NUM_TEAM_3, and NUM_TEAM_4.
Definition at line 76 of file teams.qh.
References NUM_TEAM_1, NUM_TEAM_2, NUM_TEAM_3, and NUM_TEAM_4.
Referenced by ClientKill_TeamChange(), cpicon_changeteam(), ctf_DelayedFlagSetup(), Freeze(), generator_changeteam(), HUD_Radar(), HUD_Score(), HUD_Score_Rankings(), invasion_SpawnChosenMonster(), kh_Key_Spawn(), kh_WinnerTeam(), monster_changeteam(), Monster_Spawn_Setup(), SpawnGoal(), turret_changeteam(), vehicles_enter(), and vehicles_showwp().
Definition at line 116 of file teams.qh.
References NUM_TEAM_1, NUM_TEAM_2, NUM_TEAM_3, and NUM_TEAM_4.
Referenced by ClientCommand_selectteam(), and GameCommand_moveplayer().
Converts team index into bit value that is used in team bitmasks.
[in] | index | Team index to convert. |
Definition at line 211 of file teams.qh.
References BIT.
Referenced by CA_CheckTeams(), ClientCommand_selectteam(), freezetag_CheckTeams(), Player_SetTeamIndexChecked(), TeamBalance_AutoBalanceBots(), TeamBalance_FindBestTeam(), TeamBalance_FindBestTeams(), TeamBalance_GetAllowedTeams(), and TeamBalance_GetLargestTeamIndex().
Converts team index into team value.
[in] | index | Team index to convert. |
Definition at line 169 of file teams.qh.
References NUM_TEAM_1, NUM_TEAM_2, NUM_TEAM_3, and NUM_TEAM_4.
Referenced by GameCommand_moveplayer(), Player_SetTeamIndex(), Team_GetWinnerAliveTeam(), Team_GetWinnerTeam_WithOwnedItems(), TeamBalance_GetTeamCounts(), WinningCondition_RanOutOfSpawns(), and WinningCondition_Scores().
Returns whether the team index is valid.
[in] | index | Team index to check. |
Definition at line 151 of file teams.qh.
Referenced by bot_clientconnect(), bot_setnameandstuff(), Entity_GetTeam(), Player_DetermineForcedTeam(), Player_SetForcedTeamIndex(), Player_SetTeamIndexChecked(), Team_GetTeamFromIndex(), TeamBalance_CompareTeams(), TeamBalance_GetNumberOfPlayers(), TeamBalance_GetTeamCounts(), TeamBalance_GetTeamFromIndex(), and TeamBalance_IsTeamAllowed().
Returns whether team value is valid.
[in] | team_num | Team to check. |
Definition at line 133 of file teams.qh.
References NUM_TEAM_1, NUM_TEAM_2, NUM_TEAM_3, and NUM_TEAM_4.
Referenced by bot_removefromlargestteam(), EFFECT_ROCKETMINSTA_LASER(), Entity_HasValidTeam(), link_spawnpoint(), MUTATOR_HOOKFUNCTION(), SpawnGoal(), Team_GetTeam(), Team_TeamToBit(), TeamBalance_CheckAllowedTeams(), TeamBalance_GetTeamCounts(), and WinningCondition_RanOutOfSpawns().
Converts team value into bit value that is used in team bitmasks.
[in] | team_num | Team value to convert. |
Definition at line 199 of file teams.qh.
References BIT, Team_IsValidTeam(), and Team_TeamToIndex().
Referenced by IsTeamAvailable(), and MUTATOR_HOOKFUNCTION().
Converts team value into team index.
[in] | team_num | Team value to convert. |
Definition at line 184 of file teams.qh.
References NUM_TEAM_1, NUM_TEAM_2, NUM_TEAM_3, and NUM_TEAM_4.
Referenced by ClientCommand_selectteam(), ClientKill_Now_TeamChange(), Entity_GetTeamIndex(), GameCommand_moveplayer(), Player_SetTeamIndex(), SV_ChangeTeam(), Team_GetTeam(), Team_TeamToBit(), and TeamBalance_GetTeam().
const string COL_TEAM_1 = "^1" |
Definition at line 26 of file teams.qh.
Referenced by Team_ColorCode().
const string COL_TEAM_2 = "^4" |
Definition at line 27 of file teams.qh.
Referenced by Team_ColorCode().
const string COL_TEAM_3 = "^3" |
Definition at line 28 of file teams.qh.
Referenced by Team_ColorCode().
const string COL_TEAM_4 = "^6" |
Definition at line 29 of file teams.qh.
Referenced by Team_ColorCode().
const int NUM_SPECTATOR = 1337 |
Definition at line 23 of file teams.qh.
Referenced by CSQC_Init(), CSQCPlayer_ModelAppearance_Apply(), EnemyHitCheck(), GetTeam(), HUD_Main(), HUD_Quickmenu_PlayerListEntries(), HUD_Score(), RegisterTeam(), Scoreboard_ComparePlayerScores(), Scoreboard_CompareTeamScores(), Scoreboard_DrawOthers(), Scoreboard_Spectators_Draw(), and SetTeam().
const int NUM_TEAM_1 = 5 |
Definition at line 18 of file teams.qh.
Referenced by assault_new_round(), assault_roundstart_use(), buff_Init_Compat(), Create_Notification_Entity_Choice(), ctf_CheckStalemate(), ctf_DelayedFlagSetup(), ctf_DelayedInit(), ctf_FlagSetup(), dom_spawnteams(), dompoint_captured(), Dump_Notifications(), EFFECT_CAP(), EFFECT_FLAG_TOUCH(), EFFECT_NADE_EXPLODE(), EFFECT_NADE_TRAIL(), EFFECT_NADE_TRAIL_BURN(), EFFECT_PASS(), EFFECT_ROCKETMINSTA_LASER(), EFFECT_SPAWN(), EFFECT_SPAWNPOINT(), EFFECT_VAPORIZER(), EFFECT_VAPORIZER_HIT(), FixPlayermodel(), HUD_Mod_CTF(), HUD_Mod_KH(), Invasion_CheckWinner(), Invasion_RoundStart(), invasion_SpawnChosenMonster(), kh_Key_AssignTo(), kh_Key_Spawn(), kh_Team_ByID(), MUTATOR_HOOKFUNCTION(), nb_spawnteams(), NET_HANDLE(), ons_ControlPoint_UpdateSprite(), REGISTRY_END(), ScoreInfo_Init(), SetTeam(), SND_CTF_CAPTURE(), SND_CTF_DROPPED(), SND_CTF_RETURNED(), SND_CTF_TAKEN(), spawnfunc(), Static_Team_ColorName(), tdm_DelayedInit(), Team_ColorCode(), Team_ColorName(), Team_ColorRGB(), Team_ColorToTeam(), Team_IndexToTeam(), Team_IsValidTeam(), Team_TeamToIndex(), TEST(), and WinningCondition_Assault().
const int NUM_TEAM_2 = 14 |
Definition at line 19 of file teams.qh.
Referenced by assault_new_round(), assault_roundstart_use(), buff_Init_Compat(), ctf_CheckStalemate(), ctf_DelayedFlagSetup(), ctf_DelayedInit(), ctf_FlagSetup(), dom_spawnteams(), dompoint_captured(), EFFECT_CAP(), EFFECT_FLAG_TOUCH(), EFFECT_NADE_EXPLODE(), EFFECT_NADE_TRAIL(), EFFECT_NADE_TRAIL_BURN(), EFFECT_PASS(), EFFECT_ROCKETMINSTA_LASER(), EFFECT_SPAWN(), EFFECT_SPAWNPOINT(), EFFECT_VAPORIZER(), EFFECT_VAPORIZER_HIT(), FixPlayermodel(), HUD_Mod_CTF(), HUD_Mod_KH(), Invasion_CheckWinner(), Invasion_RoundStart(), invasion_SpawnChosenMonster(), kh_Key_AssignTo(), kh_Key_Spawn(), kh_Team_ByID(), MUTATOR_HOOKFUNCTION(), nb_spawnteams(), NET_HANDLE(), ons_ControlPoint_UpdateSprite(), ScoreInfo_Init(), SetTeam(), SND_CTF_CAPTURE(), SND_CTF_DROPPED(), SND_CTF_RETURNED(), SND_CTF_TAKEN(), spawnfunc(), Static_Team_ColorName(), tdm_DelayedInit(), Team_ColorCode(), Team_ColorName(), Team_ColorRGB(), Team_ColorToTeam(), Team_IndexToTeam(), Team_IsValidTeam(), Team_TeamToIndex(), TEST(), and WinningCondition_Assault().
const int NUM_TEAM_3 = 13 |
Definition at line 20 of file teams.qh.
Referenced by ctf_CheckStalemate(), ctf_DelayedFlagSetup(), ctf_DelayedInit(), ctf_FlagSetup(), dom_spawnteams(), dompoint_captured(), EFFECT_CAP(), EFFECT_FLAG_TOUCH(), EFFECT_NADE_EXPLODE(), EFFECT_NADE_TRAIL(), EFFECT_NADE_TRAIL_BURN(), EFFECT_PASS(), EFFECT_ROCKETMINSTA_LASER(), EFFECT_SPAWN(), EFFECT_SPAWNPOINT(), EFFECT_VAPORIZER(), EFFECT_VAPORIZER_HIT(), FixPlayermodel(), HUD_Mod_CTF(), HUD_Mod_KH(), Invasion_CheckWinner(), Invasion_RoundStart(), invasion_SpawnChosenMonster(), kh_Key_AssignTo(), kh_Key_Spawn(), kh_Team_ByID(), MUTATOR_HOOKFUNCTION(), nb_spawnteams(), NET_HANDLE(), ons_ControlPoint_UpdateSprite(), ScoreInfo_Init(), SetTeam(), SND_CTF_CAPTURE(), SND_CTF_DROPPED(), SND_CTF_RETURNED(), SND_CTF_TAKEN(), spawnfunc(), Static_Team_ColorName(), tdm_DelayedInit(), Team_ColorCode(), Team_ColorName(), Team_ColorRGB(), Team_ColorToTeam(), Team_IndexToTeam(), Team_IsValidTeam(), and Team_TeamToIndex().
const int NUM_TEAM_4 = 10 |
Definition at line 21 of file teams.qh.
Referenced by ctf_CheckStalemate(), ctf_DelayedFlagSetup(), ctf_DelayedInit(), ctf_FlagSetup(), dom_spawnteams(), dompoint_captured(), EFFECT_CAP(), EFFECT_FLAG_TOUCH(), EFFECT_NADE_EXPLODE(), EFFECT_NADE_TRAIL(), EFFECT_NADE_TRAIL_BURN(), EFFECT_PASS(), EFFECT_ROCKETMINSTA_LASER(), EFFECT_SPAWN(), EFFECT_SPAWNPOINT(), EFFECT_VAPORIZER(), EFFECT_VAPORIZER_HIT(), FixPlayermodel(), HUD_Mod_CTF(), HUD_Mod_KH(), Invasion_CheckWinner(), Invasion_RoundStart(), invasion_SpawnChosenMonster(), kh_Key_AssignTo(), kh_Key_Spawn(), kh_Team_ByID(), MUTATOR_HOOKFUNCTION(), nb_spawnteams(), NET_HANDLE(), ons_ControlPoint_UpdateSprite(), ScoreInfo_Init(), SetTeam(), SND_CTF_CAPTURE(), SND_CTF_DROPPED(), SND_CTF_RETURNED(), SND_CTF_TAKEN(), spawnfunc(), Static_Team_ColorName(), tdm_DelayedInit(), Team_ColorCode(), Team_ColorName(), Team_ColorRGB(), Team_ColorToTeam(), Team_IndexToTeam(), Team_IsValidTeam(), and Team_TeamToIndex().
const int NUM_TEAMS = 4 |
Number of teams in the game.
Definition at line 3 of file teams.qh.
Referenced by adjust_respawntime(), CA_CheckTeams(), CA_count_alive_players(), Domination_count_controlpoints(), freezetag_CheckTeams(), freezetag_count_alive_players(), Onslaught_count_generators(), shuffleteams(), Team_GetNumberOfAliveTeams(), Team_GetNumberOfTeamsWithOwnedItems(), Team_GetWinnerAliveTeam(), Team_GetWinnerTeam_WithOwnedItems(), Team_InitTeams(), TeamBalance_AutoBalanceBots(), TeamBalance_BanTeamsExcept(), TeamBalance_CheckAllowedTeams(), TeamBalance_Destroy(), TeamBalance_FindBestTeam(), TeamBalance_FindBestTeams(), TeamBalance_GetAllowedTeams(), TeamBalance_GetLargestTeamIndex(), TeamBalance_GetTeamCounts(), and WinningCondition_RanOutOfSpawns().
const string STATIC_NAME_TEAM_1 = "Red" |
Definition at line 53 of file teams.qh.
Referenced by Static_Team_ColorName().
const string STATIC_NAME_TEAM_2 = "Blue" |
Definition at line 54 of file teams.qh.
Referenced by Static_Team_ColorName().
const string STATIC_NAME_TEAM_3 = "Yellow" |
Definition at line 55 of file teams.qh.
Referenced by Static_Team_ColorName().
const string STATIC_NAME_TEAM_4 = "Pink" |
Definition at line 56 of file teams.qh.
Referenced by Static_Team_ColorName().