1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Unused variable, unused code

This commit is contained in:
Tomasz Zieliński 2023-10-30 21:33:49 +01:00
parent 80198f21d8
commit 6e7b68d0e6
2 changed files with 1 additions and 26 deletions

View File

@ -264,7 +264,7 @@ void RandomMapTab::setMapGenOptions(std::shared_ptr<CMapGenOptions> opts)
} }
else // Random 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 return (playerLimit - 1) < el; // Must leave at least 1 human player
}); });

View File

@ -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() void CMapGenOptions::savePlayersMap()