From 2136135bebb6f55c2f1aaa221ee83323d7de537c Mon Sep 17 00:00:00 2001 From: jenz Date: Thu, 9 Jul 2026 18:41:23 +0200 Subject: [PATCH] just also downloading the currentmap in case its missing --- .../scripting/autism_bot_simulate_movement.sp | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/AutismBotIngame/scripting/autism_bot_simulate_movement.sp b/AutismBotIngame/scripting/autism_bot_simulate_movement.sp index 6279d41..f777d69 100755 --- a/AutismBotIngame/scripting/autism_bot_simulate_movement.sp +++ b/AutismBotIngame/scripting/autism_bot_simulate_movement.sp @@ -325,16 +325,20 @@ public void OnMapVoteEnd(const char[] map) public Action bot_check_connect(Handle timer, any data) { char nextmap[64]; + char msg[generic_length]; if (GetNextMap(nextmap, sizeof(nextmap))) { - char msg[generic_length]; Format(msg, sizeof(msg), "download map:%s", nextmap); send_socket_msg(msg, strlen(msg), ports[0]); } + GetCurrentMap(nextmap, sizeof(nextmap)); + Format(msg, sizeof(msg), "download map:%s", nextmap); + send_socket_msg(msg, strlen(msg), ports[0]); + + //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")); bool bot1_connected = false; for (int i = 1; i <= MaxClients; i++) @@ -374,15 +378,19 @@ public Action bot_check_connect(Handle timer, any data) public Action bot_check_connect2(Handle timer, any data) { char nextmap[64]; + char msg[generic_length]; if (GetNextMap(nextmap, sizeof(nextmap))) { - char msg[generic_length]; Format(msg, sizeof(msg), "download map:%s", nextmap); send_socket_msg(msg, strlen(msg), ports[0]); } + + GetCurrentMap(nextmap, sizeof(nextmap)); + Format(msg, sizeof(msg), "download map:%s", nextmap); + + send_socket_msg(msg, strlen(msg), ports[0]); //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")); bool bot2_connected = false; for (int i = 1; i <= MaxClients; i++) @@ -422,15 +430,17 @@ public Action bot_check_connect2(Handle timer, any data) public Action bot_check_connect3(Handle timer, any data) { char nextmap[64]; + char msg[generic_length]; if (GetNextMap(nextmap, sizeof(nextmap))) { - char msg[generic_length]; Format(msg, sizeof(msg), "download map:%s", nextmap); send_socket_msg(msg, strlen(msg), ports[0]); } + GetCurrentMap(nextmap, sizeof(nextmap)); + Format(msg, sizeof(msg), "download map:%s", nextmap); + //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")); bool bot3_connected = false; for (int i = 1; i <= MaxClients; i++) @@ -470,15 +480,17 @@ public Action bot_check_connect3(Handle timer, any data) public Action bot_check_connect4(Handle timer, any data) { char nextmap[64]; + char msg[generic_length]; if (GetNextMap(nextmap, sizeof(nextmap))) { - char msg[generic_length]; Format(msg, sizeof(msg), "download map:%s", nextmap); send_socket_msg(msg, strlen(msg), ports[0]); } + GetCurrentMap(nextmap, sizeof(nextmap)); + Format(msg, sizeof(msg), "download map:%s", nextmap); + //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")); bool bot4_connected = false; for (int i = 1; i <= MaxClients; i++)