From: Lyberta Date: Fri, 9 Mar 2018 15:09:52 +0000 (+0300) Subject: Use team index in TeamBalance_GetTeamCount. X-Git-Tag: xonotic-v0.8.5~1953^2~36 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=37c45b24a323da83d9063188a8632b2ab1c38513;p=xonotic%2Fxonotic-data.pk3dir.git Use team index in TeamBalance_GetTeamCount. --- diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh index b9046515d..37910cd28 100644 --- a/qcsrc/server/mutators/events.qh +++ b/qcsrc/server/mutators/events.qh @@ -145,7 +145,7 @@ MUTATOR_HOOKABLE(TeamBalance_GetTeamCounts, EV_NO_ARGS); /** allow overriding of team counts */ #define EV_TeamBalance_GetTeamCount(i, o) \ - /** team to count */ i(float, MUTATOR_ARGV_0_float) \ + /** team index to count */ i(float, MUTATOR_ARGV_0_float) \ /** player to ignore */ i(entity, MUTATOR_ARGV_1_entity) \ /** number of players in a team */ i(float, MUTATOR_ARGV_2_float) \ /**/ o(float, MUTATOR_ARGV_2_float) \ diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index 5e8d8c825..8cb78d72d 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -510,9 +510,9 @@ void TeamBalance_GetTeamCounts(entity balance, entity ignore) entity team_ = TeamBalance_GetTeamFromIndex(balance, i); if (TeamBalanceTeam_IsAllowed(team_)) { - MUTATOR_CALLHOOK(TeamBalance_GetTeamCount, Team_IndexToTeam(i), - ignore, team_.m_num_players, team_.m_num_bots, - team_.m_lowest_human, team_.m_lowest_bot); + MUTATOR_CALLHOOK(TeamBalance_GetTeamCount, i, ignore, + team_.m_num_players, team_.m_num_bots, team_.m_lowest_human, + team_.m_lowest_bot); team_.m_num_players = M_ARGV(2, float); team_.m_num_bots = M_ARGV(3, float); team_.m_lowest_human = M_ARGV(4, entity);