diff --git a/client/lobby/RandomMapTab.cpp b/client/lobby/RandomMapTab.cpp index 954b98043..1deff1ece 100644 --- a/client/lobby/RandomMapTab.cpp +++ b/client/lobby/RandomMapTab.cpp @@ -264,7 +264,7 @@ void RandomMapTab::setMapGenOptions(std::shared_ptr opts) } else // Random { - vstd::erase_if(compCountAllowed, [playerLimit, humanOrCpuPlayerCount](int el) + vstd::erase_if(compCountAllowed, [playerLimit](int el) { return (playerLimit - 1) < el; // Must leave at least 1 human player }); diff --git a/lib/rmg/CMapGenOptions.cpp b/lib/rmg/CMapGenOptions.cpp index d75a52cca..c963e5aad 100644 --- a/lib/rmg/CMapGenOptions.cpp +++ b/lib/rmg/CMapGenOptions.cpp @@ -347,31 +347,6 @@ void CMapGenOptions::resetPlayersMap() } } } - /* - for(int color = 0; color < totalPlayersLimit; ++color) - { - CPlayerSettings player; - auto pc = PlayerColor(color); - player.setColor(pc); - auto playerType = EPlayerType::AI; - if (getPlayerCount() != RANDOM_SIZE && color < realPlayersCnt) - { - playerType = EPlayerType::HUMAN; - } - else if((getPlayerCount() != RANDOM_SIZE && color >= realPlayersCnt) - || (compOnlyPlayerCount != RANDOM_SIZE && color >= (PlayerColor::PLAYER_LIMIT_I-compOnlyPlayerCount))) - { - //FIXME: Allow humans to choose any color, even from the end of the list - playerType = EPlayerType::COMP_ONLY; - } - player.setPlayerType(playerType); - player.setTeam(rememberTeam[pc]); - players[pc] = player; - - if (vstd::contains(rememberTownTypes, pc)) - players[pc].setStartingTown(rememberTownTypes[pc]); - } - */ } void CMapGenOptions::savePlayersMap()