]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/teamplay.qh
Consistent indentation in player.qc
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / teamplay.qh
index 6a862abb89a81599b934b5b0a834676cf19b88ad..776a80d329cf91d5917f1af4e1ba7275eb18a731 100644 (file)
@@ -71,7 +71,8 @@ int Entity_GetTeamIndex(entity this);
 
 /// \brief Returns the team entity of the given entity.
 /// \param[in] this Entity to check.
-/// \return Team entity of the given entity.
+/// \return Team entity of the given entity or NULL if the entity doesn't belong
+/// to any team.
 entity Entity_GetTeam(entity this);
 
 void SetPlayerColors(entity player, float _color);
@@ -84,12 +85,10 @@ bool Player_SetTeamIndex(entity player, int index);
 
 /// \brief Sets the team of the player.
 /// \param[in,out] player Player to adjust.
-/// \param[in] destination_team_index Index of the team to set.
-/// \param[in] source_team_index Previous index of the team of the player.
-/// \param[in] no_print Whether to print this event to players' console.
+/// \param[in] team_index Index of the team to set.
+/// \param[in] type ???
 /// \return True if team switch was successful, false otherwise.
-bool SetPlayerTeam(entity player, int destination_team_index,
-       int source_team_index, bool no_print);
+bool SetPlayerTeam(entity player, int team_index, int type);
 
 /// \brief Moves player to the specified team.
 /// \param[in,out] client Client to move.
@@ -104,11 +103,9 @@ void KillPlayerForTeamChange(entity player);
 
 enum
 {
-       TEAM_CHANGE_CONNECT = 1,
        TEAM_CHANGE_AUTO = 2,
        TEAM_CHANGE_MANUAL = 3,
-       TEAM_CHANGE_SPECTATOR = 4,
-       TEAM_CHANGE_AUTO_RELAXED = 99
+       TEAM_CHANGE_SPECTATOR = 4
 };
 
 void LogTeamchange(float player_id, float team_number, int type);
@@ -119,7 +116,8 @@ void LogTeamchange(float player_id, float team_number, int type);
 /// configuration and mutator settings.
 /// \param[in] for_whom Player to check for. Pass NULL for global rules.
 /// \return Team balance entity that holds information about teams. This entity
-/// must be manually destroyed by calling TeamBalance_Destroy.
+/// will be automatically destroyed on the next frame but you are encouraged to
+/// manually destroy it by calling TeamBalance_Destroy for performance reasons.
 entity TeamBalance_CheckAllowedTeams(entity for_whom);
 
 /// \brief Destroy the team balance entity.
@@ -176,7 +174,7 @@ int TeamBalance_FindBestTeam(entity balance, entity player, bool ignore_player);
 /// function.
 int TeamBalance_FindBestTeams(entity balance, entity player, bool use_score);
 
-void TeamBalance_JoinBestTeam(entity this, bool force_best_team);
+void TeamBalance_JoinBestTeam(entity this);
 
 /// \brief Describes the result of comparing teams.
 enum