mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Works more or less
This commit is contained in:
@@ -332,7 +332,7 @@ void WindowNewMap::on_humanCombo_activated(int index)
|
||||
ui->humanCombo->setCurrentIndex(humans);
|
||||
}
|
||||
|
||||
mapGenOptions.setPlayerCount(humans);
|
||||
mapGenOptions.setHumanOrCpuPlayerCount(humans);
|
||||
|
||||
int teams = mapGenOptions.getTeamCount();
|
||||
if(teams > humans - 1)
|
||||
@@ -361,8 +361,10 @@ void WindowNewMap::on_humanCombo_activated(int index)
|
||||
|
||||
void WindowNewMap::on_cpuCombo_activated(int index)
|
||||
{
|
||||
int humans = mapGenOptions.getPlayerCount();
|
||||
int humans = mapGenOptions.getHumanOrCpuPlayerCount();
|
||||
int cpu = ui->cpuCombo->currentData().toInt();
|
||||
|
||||
// FIXME: Use mapGenOption method only to calculate actual number of players for current template
|
||||
if(cpu > PlayerColor::PLAYER_LIMIT_I - humans)
|
||||
{
|
||||
cpu = PlayerColor::PLAYER_LIMIT_I - humans;
|
||||
@@ -455,7 +457,7 @@ void WindowNewMap::on_checkSeed_toggled(bool checked)
|
||||
|
||||
void WindowNewMap::on_humanTeamsCombo_activated(int index)
|
||||
{
|
||||
int humans = mapGenOptions.getPlayerCount();
|
||||
int humans = mapGenOptions.getHumanOrCpuPlayerCount();
|
||||
int teams = ui->humanTeamsCombo->currentData().toInt();
|
||||
if(teams >= humans)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user