From 37c45b24a323da83d9063188a8632b2ab1c38513 Mon Sep 17 00:00:00 2001 From: Lyberta Date: Fri, 9 Mar 2018 18:09:52 +0300 Subject: [PATCH] Use team index in TeamBalance_GetTeamCount. --- qcsrc/server/mutators/events.qh | 2 +- qcsrc/server/teamplay.qc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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); -- 2.39.2