1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Fixed shortage of Prisons on random maps.

This commit is contained in:
DjWarmonger 2014-12-19 14:04:59 +01:00
parent 9e5cc2d1b1
commit cb5a3c0f73

View File

@ -74,7 +74,7 @@ void CMapGenerator::initPrisonsRemaining()
if (isAllowed)
prisonsRemaining++;
}
prisonsRemaining = std::max<int> (0, prisonsRemaining - 16 * map->players.size()); //so at least 16 heroes will be available for every player
prisonsRemaining = std::max<int> (0, prisonsRemaining - 16 * mapGenOptions->getPlayerCount()); //so at least 16 heroes will be available for every player
}
std::unique_ptr<CMap> CMapGenerator::generate(CMapGenOptions * mapGenOptions, int randomSeed /*= std::time(nullptr)*/)