]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/teamplay.qh
Merge branch 'master' into Mario/stats_eloranking
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / teamplay.qh
index c036909495a5076de920d50eef8a3af12a70ad29..33f9d02d7e6b01da87c6dd86e6217b3ab546aa95 100644 (file)
@@ -1,5 +1,13 @@
 #pragma once
 
+int autocvar_teamplay_mode;
+
+bool autocvar_g_changeteam_banned;
+bool autocvar_teamplay_lockonrestart;
+
+bool autocvar_g_balance_teams;
+bool autocvar_g_balance_teams_prevent_imbalance;
+
 bool lockteams;
 
 // ========================== Global teams API ================================
@@ -97,6 +105,11 @@ enum
 /// \return True if team switch was successful, false otherwise.
 bool SetPlayerTeam(entity player, int team_index, int type);
 
+/// \brief Sets the team of the player with all sanity checks.
+/// \param[in,out] player Player to adjust.
+/// \param[in] team_index Index of the team to set.
+void Player_SetTeamIndexChecked(entity player, int team_index);
+
 /// \brief Moves player to the specified team.
 /// \param[in,out] client Client to move.
 /// \param[in] team_index Index of the team.
@@ -305,3 +318,9 @@ int TeamBalanceTeam_GetNumberOfBots(entity team_ent);
 /// function.
 int TeamBalance_CompareTeamsInternal(entity team_a, entity team_index_b,
        entity player, bool use_score);
+
+/// \brief Called when the player connects or when they change their color with
+/// the "color" command.
+/// \param[in,out] player Player that requested a new color.
+/// \param[in] new_color Requested color.
+void SV_ChangeTeam(entity player, int new_color);