mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-03 14:52:11 +02:00
Revert "max player count update"
This reverts commit f842b5ad916a8e936c5cbcd27a28d0c78fa1fb45. Trying another approach
This commit is contained in:
parent
f842b5ad91
commit
9cef823330
@ -124,7 +124,17 @@ si8 CMapGenOptions::getMinPlayersCount(bool withTemplateLimit) const
|
|||||||
si8 CMapGenOptions::getMaxPlayersCount(bool withTemplateLimit) const
|
si8 CMapGenOptions::getMaxPlayersCount(bool withTemplateLimit) const
|
||||||
{
|
{
|
||||||
// Max number of players possible with current settings
|
// Max number of players possible with current settings
|
||||||
auto totalPlayers = PlayerColor::PLAYER_LIMIT_I;
|
auto totalPlayers = 0;
|
||||||
|
si8 humans = getHumanOrCpuPlayerCount();
|
||||||
|
si8 cpus = getCompOnlyPlayerCount();
|
||||||
|
if (humans == RANDOM_SIZE || cpus == RANDOM_SIZE)
|
||||||
|
{
|
||||||
|
totalPlayers = PlayerColor::PLAYER_LIMIT_I;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
totalPlayers = humans + cpus;
|
||||||
|
}
|
||||||
|
|
||||||
if (withTemplateLimit && mapTemplate)
|
if (withTemplateLimit && mapTemplate)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user