From a737bcde3c10275ce59bca438d908538c3845e96 Mon Sep 17 00:00:00 2001 From: SoftCoder Date: Fri, 7 Feb 2014 16:37:55 -0800 Subject: [PATCH] - fixed hard coded paths to use derived data fodler --- source/glest_game/menu/menu_state_custom_game.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index 5b629297..5a22c621 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -703,13 +703,17 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu, publishToMasterserverThread->start(); publishToClientsThread->start(); - if(openNetworkSlots==true){ - if(fileExists(DEFAULT_NETWORKGAME_FILENAME) == true) - loadGameSettings(DEFAULT_NETWORKGAME_FILENAME); + if(openNetworkSlots == true) { + string data_path = getGameReadWritePath(GameConstants::path_data_CacheLookupKey); + + if(fileExists(data_path + DEFAULT_NETWORKGAME_FILENAME) == true) + loadGameSettings(data_path + DEFAULT_NETWORKGAME_FILENAME); } else { - if(fileExists(DEFAULT_GAME_FILENAME) == true) - loadGameSettings(DEFAULT_GAME_FILENAME); + string data_path = getGameReadWritePath(GameConstants::path_data_CacheLookupKey); + + if(fileExists(data_path + DEFAULT_GAME_FILENAME) == true) + loadGameSettings(data_path + DEFAULT_GAME_FILENAME); } if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);