just also downloading the currentmap in case its missing

This commit is contained in:
jenz 2026-07-09 18:41:23 +02:00
parent 9e703da905
commit 2136135beb

View File

@ -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++)