Browse Source

Correct counts for arena spectators

nosoop 6 years ago
parent
commit
bd8ec8856d
1 changed files with 3 additions and 2 deletions
  1. 3 2
      scripting/botmanager.sp

+ 3 - 2
scripting/botmanager.sp

@@ -5,7 +5,7 @@
 #include <tf2>
 #include <tf2_stocks>
 
-#define PLUGIN_VERSION			"1.2.2"
+#define PLUGIN_VERSION			"1.3.0"
 
 public Plugin:myinfo = {
 	name		= "[TF2] Bot Manager",
@@ -121,7 +121,8 @@ GetValidClientCount(bool:excludeTeamsOnly = true) {
 		if(!IsClientInGame(i) || IsClientSourceTV(i) || IsClientReplay(i)) {
 			continue;
 		}
-		if(excludeTeamsOnly && GetConVarBool(cvarOnTeamsOnly) && GetClientTeam(i) <= 1) {
+		// arena mode hacks
+		if(excludeTeamsOnly && GetConVarBool(cvarOnTeamsOnly) && (GetClientTeam(i) <= 1 || (GameRules_GetProp("m_nGameType") == 4 && GetEntProp(i, Prop_Send, "m_bArenaSpectator")) )) {
 			continue;
 		}
 		count++;