From cb5a3c0f735e6223a920927dadb9416fccdeec3a Mon Sep 17 00:00:00 2001 From: DjWarmonger Date: Fri, 19 Dec 2014 14:04:59 +0100 Subject: [PATCH] Fixed shortage of Prisons on random maps. --- lib/rmg/CMapGenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rmg/CMapGenerator.cpp b/lib/rmg/CMapGenerator.cpp index 366252811..3136e25c3 100644 --- a/lib/rmg/CMapGenerator.cpp +++ b/lib/rmg/CMapGenerator.cpp @@ -74,7 +74,7 @@ void CMapGenerator::initPrisonsRemaining() if (isAllowed) prisonsRemaining++; } - prisonsRemaining = std::max (0, prisonsRemaining - 16 * map->players.size()); //so at least 16 heroes will be available for every player + prisonsRemaining = std::max (0, prisonsRemaining - 16 * mapGenOptions->getPlayerCount()); //so at least 16 heroes will be available for every player } std::unique_ptr CMapGenerator::generate(CMapGenOptions * mapGenOptions, int randomSeed /*= std::time(nullptr)*/)