From 0e4b21116b3eec2cd916bfef690afd266ccb7c02 Mon Sep 17 00:00:00 2001 From: zaCade Date: Sat, 2 Jun 2018 17:37:25 +0200 Subject: [PATCH] MapChooser: Exclude bots from rtv count. Commented out the old code instead of removing. For science! --- .../scripting/rockthevote_extended.sp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/mapchooser_extended/scripting/rockthevote_extended.sp b/mapchooser_extended/scripting/rockthevote_extended.sp index 443316b7..ddbe98b2 100644 --- a/mapchooser_extended/scripting/rockthevote_extended.sp +++ b/mapchooser_extended/scripting/rockthevote_extended.sp @@ -154,7 +154,20 @@ public void OnPlayerChangedTeam(Handle event, const char[] name, bool dontBroadc void UpdateRTV() { - g_Voters = GetTeamClientCount(2) + GetTeamClientCount(3); + g_Voters = 0; + + for (int i=1; i<=MAXPLAYERS; i++) + { + if (IsClientInGame(i) && !IsFakeClient(i)) + { + if (GetClientTeam(i) == 2 || GetClientTeam(i) == 3) + { + g_Voters++; + } + } + } + +// g_Voters = GetTeamClientCount(2) + GetTeamClientCount(3); g_VotesNeeded = RoundToFloor(float(g_Voters) * GetConVarFloat(g_Cvar_Needed)); if (!g_CanRTV)