From d613e5da7b3dcef1a790bbf7d1697e6c2e2ce760 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Tue, 15 Mar 2011 23:10:00 +0000 Subject: [PATCH] - bugfix for scenarios to be able to use local content in the scenario folder --- source/glest_game/global/config.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/glest_game/global/config.cpp b/source/glest_game/global/config.cpp index 8ea72eac..a780fa2e 100644 --- a/source/glest_game/global/config.cpp +++ b/source/glest_game/global/config.cpp @@ -727,9 +727,7 @@ vector Config::getPathListForType(PathType type, string scenarioDir) { string userData = getString("UserData_Root",""); if(userData != "") { - if(userData[userData.size()-1] != '/' && userData[userData.size()-1] != '\\') { - userData += '/'; - } + endPathWithSlash(userData); //if(data_path == "") { // userData = userData; //} @@ -771,7 +769,10 @@ vector Config::getPathListForType(PathType type, string scenarioDir) { } } if(scenarioDir != "") { - pathList.push_back(data_path+scenarioDir); + //string scenarioLocation = data_path + scenarioDir; + string scenarioLocation = scenarioDir; + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Scenario path [%s]\n",scenarioLocation.c_str()); + pathList.push_back(scenarioLocation); } switch(type) {