diff --git a/src/engine/client/ec_client.c b/src/engine/client/ec_client.c index f243c2433..91c7f008f 100644 --- a/src/engine/client/ec_client.c +++ b/src/engine/client/ec_client.c @@ -513,8 +513,7 @@ void client_connect(const char *server_address_str) dbg_msg("client", "connecting to '%s'", server_address_str); - mem_zero(¤t_server_info, sizeof(current_server_info)); - current_server_info_requesttime = 0; + //client_serverinfo_request(); str_copy(buf, server_address_str, sizeof(buf)); for(k = 0; buf[k]; k++) @@ -585,6 +584,12 @@ void client_serverinfo(SERVER_INFO *serverinfo) mem_copy(serverinfo, ¤t_server_info, sizeof(current_server_info)); } +void client_serverinfo_request() +{ + mem_zero(¤t_server_info, sizeof(current_server_info)); + current_server_info_requesttime = 0; +} + static int client_load_data() { debug_font = gfx_load_texture("debug_font.png", IMG_AUTO, TEXLOAD_NORESAMPLE); diff --git a/src/engine/e_if_client.h b/src/engine/e_if_client.h index 39974ffec..319c3dead 100644 --- a/src/engine/e_if_client.h +++ b/src/engine/e_if_client.h @@ -574,5 +574,6 @@ void client_demoplayer_setpause(int paused); void client_demoplayer_setspeed(float speed); const char *client_user_directory(); void client_serverinfo(SERVER_INFO *serverinfo); +void client_serverinfo_request(); void client_serverbrowse_request(NETADDR *addr); #endif diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index 29372b620..54c587ef7 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -981,7 +981,10 @@ void MENUS::on_statechange(int new_state, int old_state) popup = POPUP_DISCONNECTED; } } else if(new_state == CLIENTSTATE_LOADING) + { popup = POPUP_CONNECTING; + client_serverinfo_request(); + } else if(new_state == CLIENTSTATE_CONNECTING) popup = POPUP_CONNECTING; else if (new_state == CLIENTSTATE_ONLINE || new_state == CLIENTSTATE_DEMOPLAYBACK)