1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Merge remote-tracking branch 'upstream/develop' into vcmi-campaign

# Conflicts:
#	lib/mapping/CMap.h
This commit is contained in:
nordsoft
2023-04-17 04:54:57 +04:00
218 changed files with 35455 additions and 1860 deletions

View File

@@ -333,7 +333,7 @@ void SelectionTab::filter(int size, bool selectFirst)
{
for(auto elem : allItems)
{
if(elem->mapHeader && elem->mapHeader->version && (!size || elem->mapHeader->width == size))
if(elem->mapHeader && (!size || elem->mapHeader->width == size))
curItems.push_back(elem);
}
}
@@ -544,9 +544,9 @@ void SelectionTab::parseMaps(const std::unordered_set<ResourceID> & files)
auto mapInfo = std::make_shared<CMapInfo>();
mapInfo->mapInit(file.getName());
// ignore unsupported map versions (e.g. WoG maps without WoG)
// but accept VCMI maps
if((mapInfo->mapHeader->version >= EMapFormat::VCMI) || (mapInfo->mapHeader->version <= CGI->settings()->getInteger(EGameSettings::TEXTS_MAP_VERSION)))
EMapFormat maxSupported = static_cast<EMapFormat>(CGI->settings()->getInteger(EGameSettings::TEXTS_MAP_VERSION));
if(mapInfo->mapHeader->version == EMapFormat::VCMI || mapInfo->mapHeader->version <= maxSupported)
allItems.push_back(mapInfo);
}
catch(std::exception & e)