engine: don't check sv_lan value in masterserver requests when DEDICATED is defined

This commit is contained in:
nillerusr 2023-02-19 15:18:49 +03:00
parent 5198d808fa
commit 9075ccd9e4

View File

@ -34,6 +34,12 @@ static char g_MasterServers[][64] =
"168.138.92.21:27016"
};
#ifdef DEDICATED
#define IsLan() false
#else
#define IsLan() sv_lan.GetInt()
#endif
//-----------------------------------------------------------------------------
// Purpose: List of master servers and some state info about them
//-----------------------------------------------------------------------------
@ -421,7 +427,7 @@ void CMaster::CheckHeartbeat (void)
ALIGN4 char buf[256] ALIGN4_POST;
if ( m_bNoMasters || // We are ignoring heartbeats
sv_lan.GetInt() || // Lan servers don't heartbeat
IsLan() || // Lan servers don't heartbeat
(sv.GetMaxClients() <= 1) || // not a multiplayer server.
!sv.IsActive() ) // only heartbeat if a server is running.
return;
@ -473,7 +479,7 @@ void CMaster::ShutdownConnection( void )
return;
if ( m_bNoMasters || // We are ignoring heartbeats
sv_lan.GetInt() || // Lan servers don't heartbeat
IsLan() || // Lan servers don't heartbeat
(sv.GetMaxClients() <= 1) ) // not a multiplayer server.
return;