1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Fixed crash due to incorrect RMG options.

This commit is contained in:
DjWarmonger
2014-09-18 14:29:57 +02:00
parent e0e83b6a0b
commit 495c39304d
3 changed files with 11 additions and 2 deletions

View File

@@ -183,8 +183,8 @@ void CMapGenOptions::finalize(CRandomGenerator & rand)
if(!mapTemplate)
{
mapTemplate = getPossibleTemplate(rand);
assert(mapTemplate);
}
assert(mapTemplate);
if(playerCount == RANDOM_SIZE)
{
@@ -220,6 +220,9 @@ void CMapGenOptions::finalize(CRandomGenerator & rand)
monsterStrength = static_cast<EMonsterStrength::EMonsterStrength>(rand.nextInt(EMonsterStrength::GLOBAL_WEAK, EMonsterStrength::GLOBAL_STRONG));
}
assert (vstd::iswithin(waterContent, EWaterContent::NONE, EWaterContent::ISLANDS));
assert (vstd::iswithin(monsterStrength, EMonsterStrength::GLOBAL_WEAK, EMonsterStrength::GLOBAL_STRONG));
//rectangular maps are the future of gaming
//setHeight(20);
//setWidth(50);