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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user