From 3749d58557ec8e24ab06ad18e2506826dead743c Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Tue, 28 Sep 2010 20:15:54 +0000 Subject: [PATCH] - bugfix when restoring game settings (from previously saved) we no longer restore playernames of non human slots. --- source/glest_game/menu/menu_state_custom_game.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index 321d6ca8..b8790460 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -1915,7 +1915,12 @@ GameSettings MenuStateCustomGame::loadGameSettingsFromFile(std::string fileName) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] i = %d, factionTypeName [%s]\n",__FILE__,__FUNCTION__,__LINE__,i,gameSettings.getFactionTypeName(i).c_str()); - gameSettings.setNetworkPlayerName(i,properties.getString(string("FactionPlayerNameForIndex") + intToStr(i),"") ); + if(gameSettings.getFactionControl(i) == ctHuman) { + gameSettings.setNetworkPlayerName(i,properties.getString(string("FactionPlayerNameForIndex") + intToStr(i),"") ); + } + else { + gameSettings.setNetworkPlayerName(i,""); + } } SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s] Line: %d\n",__FILE__,__FUNCTION__,__LINE__);