[Dedicated] fix bad editing

This commit is contained in:
TheApadayo 2017-06-07 15:27:09 -04:00
parent 498359325f
commit 9324b318ae

View File

@ -396,19 +396,18 @@ namespace Components
}); });
#ifdef USE_LEGACY_SERVER_LIST #ifdef USE_LEGACY_SERVER_LIST
// Heartbeats // Heartbeats
Scheduler::OnFrame([] () Scheduler::OnFrame([] ()
{ {
static int LastHeartbeat = 0; static int LastHeartbeat = 0;
if (Dvar::Var("sv_maxclients").get<int>() > 0 && !LastHeartbeat || (Game::Com_Milliseconds() - LastHeartbeat) > 120 * 1000) if (Dvar::Var("sv_maxclients").get<int>() > 0 && !LastHeartbeat || (Game::Com_Milliseconds() - LastHeartbeat) > 120 * 1000)
{ {
LastHeartbeat = Game::Com_Milliseconds(); LastHeartbeat = Game::Com_Milliseconds();
Dedicated::Heartbeat(); Dedicated::Heartbeat();
} }
}); });
#endif #endif
}
Dvar::OnInit([] () Dvar::OnInit([] ()
{ {