Skip to content

Commit 4ce5678

Browse files
committed
Allow team choosing in ownerless server if live players is true
1 parent 07c973f commit 4ce5678

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/network/protocols/server_lobby.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,8 @@ void ServerLobby::startSelection(const Event *event)
13001300
}
13011301

13021302

1303-
if (ServerConfig::m_team_choosing && race_manager->teamEnabled())
1303+
if (!ServerConfig::m_owner_less && ServerConfig::m_team_choosing &&
1304+
race_manager->teamEnabled())
13041305
{
13051306
auto red_blue = STKHost::get()->getAllPlayersTeamInfo();
13061307
if ((red_blue.first == 0 || red_blue.second == 0) &&

src/network/server_config.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,8 @@ void loadServerLobbyFromConfig()
314314
{
315315
if (m_min_start_game_players > m_server_max_players)
316316
m_min_start_game_players = 1;
317-
m_team_choosing = false;
317+
if (!m_live_players)
318+
m_team_choosing = false;
318319
m_server_configurable = false;
319320
}
320321
if (modes.second == RaceManager::MAJOR_MODE_GRAND_PRIX)

src/network/server_config.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ namespace ServerConfig
206206
SERVER_CFG_PREFIX BoolServerConfigParam m_team_choosing
207207
SERVER_CFG_DEFAULT(BoolServerConfigParam(true, "team-choosing",
208208
"Enable team choosing in lobby in team game (soccer and CTF). "
209-
"If owner-less is enabled, than this option is always disabled."));
209+
"If owner-less is enabled and live-players is not enabled, than this "
210+
"option is always disabled."));
210211

211212
SERVER_CFG_PREFIX BoolServerConfigParam m_strict_players
212213
SERVER_CFG_DEFAULT(BoolServerConfigParam(false, "strict-players",

0 commit comments

Comments
 (0)