]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use team index in TeamBalance_GetTeamCount.
authorLyberta <lyberta@lyberta.net>
Fri, 9 Mar 2018 15:09:52 +0000 (18:09 +0300)
committerLyberta <lyberta@lyberta.net>
Fri, 9 Mar 2018 15:09:52 +0000 (18:09 +0300)
qcsrc/server/mutators/events.qh
qcsrc/server/teamplay.qc

index b9046515dbf07e52cc32b06e73b5e0c468010068..37910cd28ff5dcba8fe6287f6ace004e66a56804 100644 (file)
@@ -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) \
index 5e8d8c82561f265fd47bc25ec8d284c82fe04f43..8cb78d72d96fb5b3f973df7b803c3e94269554b3 100644 (file)
@@ -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);