Change default voting timeout

This commit is contained in:
Benau 2018-12-22 09:56:59 +08:00
parent f3bb19125c
commit 64acb295a8
2 changed files with 5 additions and 1 deletions

View File

@ -257,6 +257,10 @@ void loadServerLobbyFromConfig()
if (unsupportedGameMode()) if (unsupportedGameMode())
Log::fatal("ServerConfig", "Unsupported game mode"); Log::fatal("ServerConfig", "Unsupported game mode");
// TODO Remove when config directory changed from 0.10-git
if (m_voting_timeout == 20.0f)
m_voting_timeout = 30.0f;
int frequency_in_config = m_state_frequency; int frequency_in_config = m_state_frequency;
if (frequency_in_config <= 0 || if (frequency_in_config <= 0 ||
frequency_in_config > stk_config->getPhysicsFPS()) frequency_in_config > stk_config->getPhysicsFPS())

View File

@ -145,7 +145,7 @@ namespace ServerConfig
"words here or a file.txt and let STK load it.")); "words here or a file.txt and let STK load it."));
SERVER_CFG_PREFIX FloatServerConfigParam m_voting_timeout SERVER_CFG_PREFIX FloatServerConfigParam m_voting_timeout
SERVER_CFG_DEFAULT(FloatServerConfigParam(20.0f, "voting-timeout", SERVER_CFG_DEFAULT(FloatServerConfigParam(30.0f, "voting-timeout",
"Timeout in seconds for voting tracks in server.")); "Timeout in seconds for voting tracks in server."));
SERVER_CFG_PREFIX FloatServerConfigParam m_validation_timeout SERVER_CFG_PREFIX FloatServerConfigParam m_validation_timeout