]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/teamplay.qh
Improved MoveToTeam.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / teamplay.qh
index 396a45d89aae98fb929c8a6a742b5b44412ca938..a7fc34b56facac35cd8b8fd45608824738a2d4a5 100644 (file)
@@ -1,5 +1,9 @@
 #pragma once
 
+bool lockteams;
+
+// ========================== Global teams API ================================
+
 /// \brief Returns the global team entity at the given index.
 /// \param[in] index Index of the team.
 /// \return Global team entity at the given index.
@@ -11,6 +15,8 @@ entity Team_GetTeamFromIndex(int index);
 /// \return Global team entity that corresponds to the given TEAM_NUM value.
 entity Team_GetTeam(int team_num);
 
+// ========================= Team specific API ================================
+
 /// \brief Returns the score of the team.
 /// \param[in] team_ Team entity.
 /// \return Score of the team.
@@ -53,6 +59,8 @@ void TeamchangeFrags(entity e);
 
 void LogTeamchange(float player_id, float team_number, float type);
 
+// ======================= Entity specific API ================================
+
 void setcolor(entity this, int clr);
 
 /// \brief Returns whether the given entity belongs to a valid team.
@@ -87,6 +95,13 @@ bool Player_SetTeamIndex(entity player, int index);
 bool SetPlayerTeam(entity player, int destination_team_index,
        int source_team_index, bool no_print);
 
+/// \brief Moves player to the specified team.
+/// \param[in,out] client Client to move.
+/// \param[in] team_index Index of the team.
+/// \param[in] type ???
+/// \return True on success, false otherwise.
+bool MoveToTeam(entity client, int team_index, float type);
+
 /// \brief Kills player as a result of team change.
 /// \param[in,out] player Player to kill.
 void KillPlayerForTeamChange(entity player);