- bugfix for loading scenarios with their own techs

- all scenario errors are now caught and shown in a messagebox and game can continue.
This commit is contained in:
SoftCoder
2013-12-30 02:01:47 -08:00
parent b6cd751250
commit fda53f47d1
5 changed files with 2359 additions and 611 deletions

View File

@@ -379,6 +379,8 @@ void MenuStateScenario::launchGame() {
GameSettings gameSettings;
loadGameSettings(&scenarioInfo, &gameSettings);
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] gameSettings.getScenarioDir() [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,gameSettings.getScenarioDir().c_str());
const vector<string> pathTechList = Config::getInstance().getPathListForType(ptTechs,gameSettings.getScenarioDir());
if(TechTree::exists(gameSettings.getTech(), pathTechList) == false) {
char szBuf[8096]="";