diff --git a/AutismBotIngame/python/ingamefollowct.py b/AutismBotIngame/python/ingamefollowct.py index 0167b32e..c77728fb 100644 --- a/AutismBotIngame/python/ingamefollowct.py +++ b/AutismBotIngame/python/ingamefollowct.py @@ -195,6 +195,8 @@ if __name__ == '__main__': print('bot kicked server full: ', datetime.datetime.now().time()) elif "connected to" in data: connected_to_other = True + elif "not connected" in data: + connected_to_other = False elif "connect to" in data: if connection_issue_counter == 20: kill_owned_process("pidof hl2_linux") @@ -205,7 +207,7 @@ if __name__ == '__main__': launch_css_process() connected_to_other = False connection_issue_counter = -10 - if not connected_to_other or "ze" in data: + if not connected_to_other: connection_issue_counter += 1 print('connection_issue_counter: ', connection_issue_counter) bot_connect(data, connected_to_other) @@ -252,4 +254,3 @@ if [[ $DISPLAY ]]; then fi """ - diff --git a/AutismBotIngame/scripting/autism_bot_info.sp b/AutismBotIngame/scripting/autism_bot_info.sp index 5b26dc1c..25f0e28a 100644 --- a/AutismBotIngame/scripting/autism_bot_info.sp +++ b/AutismBotIngame/scripting/autism_bot_info.sp @@ -300,6 +300,7 @@ public void send_socket_msg(char[] query_msg, int len, int port) public Action bot_check_connect(Handle timer, any data) { + //this is designed for being ran from several css servers int client_count = GetClientCount(false); char msg[generic_length]; int i_port = GetConVarInt(FindConVar("hostport")); @@ -365,14 +366,11 @@ public Action bot_check_connect(Handle timer, any data) } else { - found_bot1 = true; - found_bot2 = true; - found_bot3 = true; - found_bot4 = true; if (is_autism_bot1(i)) { Format(msg, sizeof(msg), "connected to gg"); send_socket_msg(msg, strlen(msg), ports[0]); + found_bot1 = true; } else if (is_bot_player(i)) { @@ -381,17 +379,25 @@ public Action bot_check_connect(Handle timer, any data) if (is_autism_bot2(i)) { send_socket_msg(msg, strlen(msg), ports[1]); + found_bot2 = true; } if (is_autism_bot3(i)) { send_socket_msg(msg, strlen(msg), ports[2]); + found_bot3 = true; } if (is_autism_bot4(i)) { send_socket_msg(msg, strlen(msg), ports[3]); + found_bot4 = true; } } } + //this check ensures servers dont overlap each other + if (!is_host_ze) + { + Format(msg, sizeof(msg), "not connected"); + } if (!found_bot1) { send_socket_msg(msg, strlen(msg), ports[0]);