[News] Do not initialize when running as a dedicated server

This commit is contained in:
sr0 2017-02-21 21:40:18 +01:00
parent 6d151f7707
commit 151bb04a26

View File

@ -121,7 +121,8 @@ namespace Components
News::News() News::News()
{ {
News::UpdaterArgs.clear(); News::UpdaterArgs.clear();
if (ZoneBuilder::IsEnabled()) return; // Maybe also dedi?
if (ZoneBuilder::IsEnabled() && Dedicated::Dedicated::IsEnabled()) return; // Maybe also dedi?
Dvar::Register<bool>("g_firstLaunch", true, Game::DVAR_FLAG_SAVED, ""); Dvar::Register<bool>("g_firstLaunch", true, Game::DVAR_FLAG_SAVED, "");
@ -174,7 +175,7 @@ namespace Components
News::LaunchUpdater("-update -c"); News::LaunchUpdater("-update -c");
}); });
if (!Utils::IsWineEnvironment() && !Loader::PerformingUnitTests()) if (!Utils::IsWineEnvironment() && !Loader::PerformingUnitTests() && !Dedicated::Dedicated::IsEnabled())
{ {
News::Terminate = false; News::Terminate = false;
News::Thread = std::thread([]() News::Thread = std::thread([]()