Skip to content

Commit

Permalink
fixup 'less config reloads'
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Jun 18, 2015
1 parent e8723b9 commit 7fce000
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/game_config_manager.cpp
Expand Up @@ -557,7 +557,9 @@ void game_config_manager::load_game_config_for_game(
void game_config_manager::load_game_config_for_create(bool is_mp)
{
game_config::scoped_preproc_define multiplayer("MULTIPLAYER", is_mp);

///During an mp game the default difficuly define is also defined so better already load it now if we alreeady must reload config cache.
game_config::scoped_preproc_define normal(DEFAULT_DIFFICULTY, !map_includes(old_defines_map_, cache_.get_preproc_map()));

typedef boost::shared_ptr<game_config::scoped_preproc_define> define;
try{
load_game_config(NO_INCLUDE_RELOAD);
Expand Down
5 changes: 2 additions & 3 deletions src/game_launcher.cpp
Expand Up @@ -942,9 +942,8 @@ bool game_launcher::play_multiplayer()


}
//create_engine already calls game_config_manager::get()->load_config
//game_config_manager::get()->
// load_game_config_for_game(state_.classification());
//create_engine already calls game_config_manager::get()->load_config but maybe its better to have MULTIPLAYER defined while we are in the lobby.
game_config_manager::get()->load_game_config_for_create(true);

events::discard_input(); // prevent the "keylogger" effect
cursor::set(cursor::NORMAL);
Expand Down

0 comments on commit 7fce000

Please sign in to comment.