Skip to content

Commit

Permalink
Added GameSpy initialization and shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
L committed Feb 5, 2023
1 parent 92f58d2 commit 64520b9
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions code/server/sv_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,11 +441,28 @@ void SV_Startup( void ) {
svs.initialized = qtrue;
memset( last_mapname, 0, sizeof( last_mapname ) );

// FIXME: use another master network ?
//SV_InitGamespy();
SV_InitGamespy();
Cvar_Set( "sv_running", "1" );
}

/*
==================
SV_NumClients
==================
*/
int SV_NumClients(void) {
int i;
int numClients = 0;

for (i = 0; i < svs.iNumClients; i++) {
if (svs.clients[i].state > CS_FREE) {
++numClients;
}
}

return numClients;
}

/*
==================
SV_ChangeMaxClients
Expand Down Expand Up @@ -1062,6 +1079,7 @@ void SV_Shutdown( const char *finalmsg ) {
}

SV_RemoveOperatorCommands();
SV_ShutdownGamespy();
SV_MasterShutdown();
SV_ShutdownGameProgs();

Expand Down

0 comments on commit 64520b9

Please sign in to comment.