From f344aac3f828444044184ab278b09f53e0b91ac7 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Thu, 19 Sep 2013 06:56:50 +0000 Subject: [PATCH] - load-scenarios now alsways takes physical folder name of the scenario --- source/glest_game/menu/menu_state_scenario.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/source/glest_game/menu/menu_state_scenario.cpp b/source/glest_game/menu/menu_state_scenario.cpp index 1d5d33fb2..a13c49b67 100644 --- a/source/glest_game/menu/menu_state_scenario.cpp +++ b/source/glest_game/menu/menu_state_scenario.cpp @@ -300,11 +300,19 @@ void MenuStateScenario::update() { return; } if(this->autoloadScenarioName != "") { - listBoxScenario.setSelectedItem(formatString(this->autoloadScenarioName),false); + loadScenarioInfo(Scenario::getScenarioPath(dirList, this->autoloadScenarioName), &scenarioInfo ); + if(scenarioInfo.namei18n != "") { + this->autoloadScenarioName = scenarioInfo.namei18n; + } + else { + this->autoloadScenarioName = formatString(this->autoloadScenarioName); + } - if(listBoxScenario.getSelectedItem() != formatString(this->autoloadScenarioName)) { + listBoxScenario.setSelectedItem(this->autoloadScenarioName,false); + + if(listBoxScenario.getSelectedItem() != this->autoloadScenarioName) { mainMessageBoxState=1; - showMessageBox( "Could not find scenario name: " + formatString(this->autoloadScenarioName), "Scenario Missing", false); + showMessageBox( "Could not find scenario name: " + this->autoloadScenarioName, "Scenario Missing", false); this->autoloadScenarioName = ""; } else {