mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Rolled back some incorrect values.
This commit is contained in:
parent
67793a2db4
commit
eae7e5c51f
@ -194,7 +194,7 @@ void CMapGenOptions::finalize(CRandomGenerator & rand)
|
||||
auto possiblePlayers = mapTemplate->getPlayers().getNumbers();
|
||||
possiblePlayers.erase(possiblePlayers.begin(), possiblePlayers.lower_bound(countHumanPlayers()));
|
||||
assert(!possiblePlayers.empty());
|
||||
playerCount = rand.nextInt(possiblePlayers.size());
|
||||
playerCount = *RandomGeneratorUtil::nextItem(possiblePlayers, rand);
|
||||
updatePlayers();
|
||||
}
|
||||
if(teamCount == RANDOM_SIZE)
|
||||
@ -204,7 +204,7 @@ void CMapGenOptions::finalize(CRandomGenerator & rand)
|
||||
if(compOnlyPlayerCount == RANDOM_SIZE)
|
||||
{
|
||||
auto possiblePlayers = mapTemplate->getCpuPlayers().getNumbers();
|
||||
compOnlyPlayerCount = rand.nextInt(possiblePlayers.size());
|
||||
compOnlyPlayerCount = *RandomGeneratorUtil::nextItem(possiblePlayers, rand);
|
||||
updateCompOnlyPlayers();
|
||||
}
|
||||
if(compOnlyTeamCount == RANDOM_SIZE)
|
||||
@ -220,11 +220,11 @@ void CMapGenOptions::finalize(CRandomGenerator & rand)
|
||||
|
||||
if(waterContent == EWaterContent::RANDOM)
|
||||
{
|
||||
waterContent = static_cast<EWaterContent::EWaterContent>(rand.nextInt(EWaterContent::TOTAL_COUNT));
|
||||
waterContent = static_cast<EWaterContent::EWaterContent>(rand.nextInt(EWaterContent::LAST_ITEM));
|
||||
}
|
||||
if(monsterStrength == EMonsterStrength::RANDOM)
|
||||
{
|
||||
monsterStrength = static_cast<EMonsterStrength::EMonsterStrength>(rand.nextInt(EMonsterStrength::TOTAL_COUNT));
|
||||
monsterStrength = static_cast<EMonsterStrength::EMonsterStrength>(rand.nextInt(EMonsterStrength::LAST_ITEM));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ namespace EWaterContent
|
||||
NONE,
|
||||
NORMAL,
|
||||
ISLANDS,
|
||||
TOTAL_COUNT
|
||||
LAST_ITEM = ISLANDS
|
||||
};
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ namespace EMonsterStrength
|
||||
WEAK,
|
||||
NORMAL,
|
||||
STRONG,
|
||||
TOTAL_COUNT
|
||||
LAST_ITEM = STRONG
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user