mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-21 00:19:29 +02:00
- fixed bug when generating random map and adding player info data
This commit is contained in:
@ -133,7 +133,8 @@ void CMapGenerator::addPlayerInfo()
|
||||
{
|
||||
player.canHumanPlay = true;
|
||||
}
|
||||
auto itTeam = std::next(teamNumbers[j].begin(), rand.nextInt (teamNumbers[j].size()));
|
||||
|
||||
auto itTeam = RandomGeneratorUtil::nextItem(teamNumbers[j], rand);
|
||||
player.team = TeamID(*itTeam);
|
||||
teamNumbers[j].erase(itTeam);
|
||||
map->players[pSettings.getColor().getNum()] = player;
|
||||
|
Reference in New Issue
Block a user