mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
sv_reportheartbeats
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1085 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
d2f4a6a213
commit
fbcb802f1f
1 changed files with 12 additions and 3 deletions
|
@ -106,6 +106,7 @@ cvar_t allow_download_wads = {"allow_download_wads", "1"};
|
|||
|
||||
cvar_t sv_public = {"sv_public", "0"};
|
||||
cvar_t sv_listen = {"sv_listen", "1"};
|
||||
cvar_t sv_reportheartbeats = {"sv_reportheartbeats", "1"};
|
||||
cvar_t sv_highchars = {"sv_highchars", "1"};
|
||||
cvar_t sv_loadentfiles = {"sv_loadentfiles", "1"};
|
||||
cvar_t sv_maxrate = {"sv_maxrate", "10000"};
|
||||
|
@ -2880,6 +2881,7 @@ void SV_InitLocal (void)
|
|||
|
||||
Cvar_Register (&sv_public, cvargroup_servercontrol);
|
||||
Cvar_Register (&sv_listen, cvargroup_servercontrol);
|
||||
Cvar_Register (&sv_reportheartbeats, cvargroup_servercontrol);
|
||||
|
||||
#ifndef SERVERONLY
|
||||
if (isDedicated)
|
||||
|
@ -3120,13 +3122,18 @@ void Master_Heartbeat (void)
|
|||
|
||||
madeqwstring = true;
|
||||
}
|
||||
|
||||
if (sv_reportheartbeats.value)
|
||||
Con_Printf ("Sending heartbeat to %s\n", NET_AdrToString (sv_masterlist[i].adr));
|
||||
|
||||
NET_SendPacket (NS_SERVER, strlen(string), string, sv_masterlist[i].adr);
|
||||
break;
|
||||
case true:
|
||||
if (sv_listen.value>=2) //set listen to 1 to allow qw connections, 2 to allow nq connections too.
|
||||
{
|
||||
if (sv_reportheartbeats.value)
|
||||
Con_Printf ("Sending heartbeat to %s\n", NET_AdrToString (sv_masterlist[i].adr));
|
||||
|
||||
{
|
||||
char *str = "\377\377\377\377heartbeat DarkPlaces\x0A";
|
||||
NET_SendPacket (NS_SERVER, strlen(str), str, sv_masterlist[i].adr);
|
||||
|
@ -3189,7 +3196,9 @@ void Master_Shutdown (void)
|
|||
switch(sv_masterlist[i].isdp)
|
||||
{
|
||||
case false:
|
||||
if (sv_reportheartbeats.value)
|
||||
Con_Printf ("Sending heartbeat to %s\n", NET_AdrToString (sv_masterlist[i].adr));
|
||||
|
||||
NET_SendPacket (NS_SERVER, strlen(string), string, sv_masterlist[i].adr);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue