Disabled debug mode when entering the multiplayer lobby,

...but allowed to enable it later if wesnoth was started in mp_debug
mode. (Fix for bug #17412.)
This commit is contained in:
Guillaume Melquiond 2010-12-29 20:25:51 +00:00
parent 69121b6010
commit 939eb12553
3 changed files with 2 additions and 5 deletions

View File

@ -2382,9 +2382,7 @@ static int do_gameloop(int argc, char** argv)
continue;
}
} else if(res == gui2::ttitle_screen::MULTIPLAYER) {
if (!game_config::mp_debug) {
game_config::debug = false;
}
game_config::debug = false;
if(game.play_multiplayer() == false) {
continue;
}

View File

@ -3356,7 +3356,7 @@ void console_handler::do_turn_limit()
}
void console_handler::do_debug() {
if (network::nconnections() == 0) {
if (network::nconnections() == 0 || game_config::mp_debug) {
print(get_cmd(), _("Debug mode activated!"));
game_config::debug = true;
} else {

View File

@ -770,7 +770,6 @@ lobby::lobby(game_display& disp, const config& cfg, chat& c, config& gamelist) :
filter_text_.set_help_string(_("Only show games whose title or description contain the entered text"));
#endif
game_config::debug = false;
gamelist_updated();
sound::play_music_repeatedly(game_config::lobby_music);
}