1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

Allows to load campaigns from the user directory too.

This commit is contained in:
Frank Zago 2012-06-09 14:26:41 +00:00
parent e7d82a9702
commit 5dff7d64f6

View File

@ -1163,6 +1163,12 @@ SelectionTab::SelectionTab(CMenuScreen::EState Type, const boost::function<void(
break;
case CMenuScreen::campaignList:
getFiles(toParse, GameConstants::DATA_DIR + "/Maps", "h3c"); //get all campaigns
/* Load campaingns from user directory too, unless it is also the
* same as the data directory (as is the case on
* windows). */
if (GVCMIDirs.UserPath != GameConstants::DATA_DIR)
getFiles(toParse, GVCMIDirs.UserPath + "/Maps", "h3c"); //get all maps
for (int g=0; g<toParse.size(); ++g)
{
toParse[g].inLod = false;