Allow team choosing in ownerless server if live players is true

This commit is contained in:
Benau 2019-01-07 12:41:00 +08:00
parent 07c973f35a
commit 4ce5678fd6
3 changed files with 6 additions and 3 deletions

View File

@ -1300,7 +1300,8 @@ void ServerLobby::startSelection(const Event *event)
}
if (ServerConfig::m_team_choosing && race_manager->teamEnabled())
if (!ServerConfig::m_owner_less && ServerConfig::m_team_choosing &&
race_manager->teamEnabled())
{
auto red_blue = STKHost::get()->getAllPlayersTeamInfo();
if ((red_blue.first == 0 || red_blue.second == 0) &&

View File

@ -314,7 +314,8 @@ void loadServerLobbyFromConfig()
{
if (m_min_start_game_players > m_server_max_players)
m_min_start_game_players = 1;
m_team_choosing = false;
if (!m_live_players)
m_team_choosing = false;
m_server_configurable = false;
}
if (modes.second == RaceManager::MAJOR_MODE_GRAND_PRIX)

View File

@ -206,7 +206,8 @@ namespace ServerConfig
SERVER_CFG_PREFIX BoolServerConfigParam m_team_choosing
SERVER_CFG_DEFAULT(BoolServerConfigParam(true, "team-choosing",
"Enable team choosing in lobby in team game (soccer and CTF). "
"If owner-less is enabled, than this option is always disabled."));
"If owner-less is enabled and live-players is not enabled, than this "
"option is always disabled."));
SERVER_CFG_PREFIX BoolServerConfigParam m_strict_players
SERVER_CFG_DEFAULT(BoolServerConfigParam(false, "strict-players",