Browse Source

Also suspend bot checks on Arena round win

nosoop 6 years ago
parent
commit
9d987d9418
1 changed files with 7 additions and 3 deletions
  1. 7 3
      scripting/botmanager.sp

+ 7 - 3
scripting/botmanager.sp

@@ -5,7 +5,7 @@
 #include <tf2>
 #include <tf2_stocks>
 
-#define PLUGIN_VERSION			"1.3.2"
+#define PLUGIN_VERSION			"1.3.3"
 
 public Plugin:myinfo = {
 	name		= "[TF2] Bot Manager",
@@ -94,9 +94,13 @@ public OnMapEnd() {
 }
 
 public Action:Timer_CheckBotNum(Handle:timer) {
-	if (GameRules_GetProp("m_nGameType") == 4 && GameRules_GetRoundState() == RoundState_Stalemate) {
+	if (GameRules_GetProp("m_nGameType") == 4) {
 		// suspend bot checks during an active arena round
-		return Plugin_Continue;
+		switch (GameRules_GetRoundState()) {
+			case RoundState_Stalemate, RoundState_TeamWin: {
+				return Plugin_Continue;
+			}
+		}
 	}
 	
 	new clients = GetValidClientCount();