From b5e33ec626895df86aec81a5186fa2a7f1794864 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Fri, 10 Nov 2017 10:17:24 +1100 Subject: [PATCH] MP: removed on-connection handing of unused join_game signal I can't find any code on the server side that would send this signal, so I'm assuming it must be a relic of some removed feature. In any case, we don't support joining MP games by bypassing the lobby. Note the `if(!received_join_lobby)` check was removed since it could only apply to a case where join_game was received, since there are only two loop-exit conditions. --- src/game_initialization/multiplayer.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/game_initialization/multiplayer.cpp b/src/game_initialization/multiplayer.cpp index e993402c5097..88b0ab9ce722 100644 --- a/src/game_initialization/multiplayer.cpp +++ b/src/game_initialization/multiplayer.cpp @@ -102,7 +102,6 @@ wesnothd_connection_ptr open_connection(CVideo& video, std::string host) initial_lobby_config.clear(); bool received_join_lobby = false; - bool received_join_game = false; bool received_gamelist = false; // Then, log in and wait for the lobby/game join prompt. @@ -353,20 +352,12 @@ wesnothd_connection_ptr open_connection(CVideo& video, std::string host) gui2::dialogs::loading_screen::progress(loading_stage::download_lobby_data); } - if(data.has_child("join_game")) { - received_join_game = true; - } - if(data.has_child("gamelist")) { received_gamelist = true; std::swap(initial_lobby_config, data); } - } while(!(received_join_lobby && received_gamelist) && !received_join_game); - - if(!received_join_lobby) { - return wesnothd_connection_ptr(); - } + } while(!received_join_lobby || !received_gamelist); return sock; }