Skip to content

Commit

Permalink
- fixed hard coded paths to use derived data fodler
Browse files Browse the repository at this point in the history
  • Loading branch information
softcoder committed Feb 8, 2014
1 parent 3c6bac9 commit a737bcd
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions source/glest_game/menu/menu_state_custom_game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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__);

Expand Down

0 comments on commit a737bcd

Please sign in to comment.