Parcourir la source

Also suspend bot checks on Arena round win

nosoop il y a 6 ans
Parent
commit
9d987d9418
1 fichiers modifiés avec 7 ajouts et 3 suppressions
  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();