Fix ServerConfig and STKConfig dependencies

This commit is contained in:
Benau 2018-09-11 15:35:24 +08:00
parent 1c94cd6880
commit 3337f41529
2 changed files with 4 additions and 3 deletions

View File

@ -1601,7 +1601,6 @@ void initUserConfig()
//=============================================================================
void initRest()
{
stk_config->load(file_manager->getAsset("stk_config.xml"));
irr_driver = new IrrDriver();
@ -1822,6 +1821,8 @@ int main(int argc, char *argv[] )
handleCmdLinePreliminary();
// ServerConfig will use stk_config for server version testing
stk_config->load(file_manager->getAsset("stk_config.xml"));
bool has_server_config = false;
bool no_graphics = !CommandLine::has("--graphical-server");
// Load current server config first, if any option is specified than

View File

@ -256,8 +256,8 @@ void loadServerLobbyFromConfig()
if (unsupportedGameMode())
Log::fatal("ServerConfig", "Unsupported game mode");
if (m_server_difficulty > (unsigned)RaceManager::DIFFICULTY_LAST)
m_server_difficulty = (unsigned)RaceManager::DIFFICULTY_LAST;
if (m_server_difficulty > RaceManager::DIFFICULTY_LAST)
m_server_difficulty = RaceManager::DIFFICULTY_LAST;
if (m_server_mode > 8)
m_server_mode = 3;