Skip to content

Commit

Permalink
Removed redundant titlescreen control blocks in MP cases
Browse files Browse the repository at this point in the history
No need to continue since we're already at the end of the loop. Regardless of the return value,
we want to loop again, in which case break handles that just fine.
  • Loading branch information
Vultraz committed Jan 5, 2021
1 parent 36bd3b2 commit 3932a11
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/wesnoth.cpp
Expand Up @@ -911,21 +911,15 @@ static int do_gameloop(const std::vector<std::string>& args)
return 0;
case gui2::dialogs::title_screen::MP_CONNECT:
game_config::set_debug(game_config::mp_debug);
if(!game->play_multiplayer(game_launcher::mp_mode::CONNECT)) {
continue;
}
game->play_multiplayer(game_launcher::mp_mode::CONNECT);
break;
case gui2::dialogs::title_screen::MP_HOST:
game_config::set_debug(game_config::mp_debug);
if(!game->play_multiplayer(game_launcher::mp_mode::HOST)) {
continue;
}
game->play_multiplayer(game_launcher::mp_mode::HOST);
break;
case gui2::dialogs::title_screen::MP_LOCAL:
game_config::set_debug(game_config::mp_debug);
if(!game->play_multiplayer(game_launcher::mp_mode::LOCAL)) {
continue;
}
game->play_multiplayer(game_launcher::mp_mode::LOCAL);
break;
case gui2::dialogs::title_screen::RELOAD_GAME_DATA:
gui2::dialogs::loading_screen::display([&config_manager]() {
Expand Down

0 comments on commit 3932a11

Please sign in to comment.