[Dedicated] fix bad editing
This commit is contained in:
parent
498359325f
commit
9324b318ae
@ -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([] ()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user