Skip to content

Commit

Permalink
MP: removed on-connection handing of unused join_game signal
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Vultraz committed Nov 9, 2017
1 parent ecb72d5 commit b5e33ec
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/game_initialization/multiplayer.cpp
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit b5e33ec

Please sign in to comment.