engine: server: send server info to all master servers

This commit is contained in:
Alibek Omarov 2022-08-17 21:18:16 +03:00
parent 01a3321d63
commit b3c9637422

View File

@ -714,13 +714,9 @@ Master_Add
*/ */
void Master_Add( void ) void Master_Add( void )
{ {
netadr_t adr;
NET_Config( true, false ); // allow remote NET_Config( true, false ); // allow remote
if( NET_SendToMasters( NS_SERVER, 2, "q\xFF" ))
if( !NET_StringToAdr( MASTERSERVER_ADR, &adr )) svs.last_heartbeat = MAX_HEARTBEAT;
Con_Printf( "can't resolve adr: %s\n", MASTERSERVER_ADR );
else NET_SendPacket( NS_SERVER, 2, "q\xFF", adr );
} }
/* /*
@ -757,13 +753,8 @@ Informs all masters that this server is going down
*/ */
void Master_Shutdown( void ) void Master_Shutdown( void )
{ {
netadr_t adr;
NET_Config( true, false ); // allow remote NET_Config( true, false ); // allow remote
while( NET_SendToMasters( NS_SERVER, 2, "\x62\x0A" ));
if( !NET_StringToAdr( MASTERSERVER_ADR, &adr ))
Con_Printf( "can't resolve addr: %s\n", MASTERSERVER_ADR );
else NET_SendPacket( NS_SERVER, 2, "\x62\x0A", adr );
} }
/* /*