diff --git a/code/server/sv_init.c b/code/server/sv_init.c index 51f228fd..b8fb28c2 100644 --- a/code/server/sv_init.c +++ b/code/server/sv_init.c @@ -374,16 +374,12 @@ static void SV_ClearServer(void) { /* ================ -SV_TouchCGame - - touch the cgame.vm so that a pure client can load it if it's in a separate pk3 +SV_TouchFile ================ */ -static void SV_TouchCGame(void) { +static void SV_TouchFile( const char *filename ) { fileHandle_t f; - char filename[MAX_QPATH]; - Com_sprintf( filename, sizeof(filename), "vm/%s.qvm", "cgame" ); FS_FOpenFileRead( filename, &f, qfalse ); if ( f ) { FS_FCloseFile( f ); @@ -574,11 +570,11 @@ void SV_SpawnServer( char *server, qboolean killBots ) { p = FS_LoadedPakNames(); Cvar_Set( "sv_pakNames", p ); - // if a dedicated pure server we need to touch the cgame because it could be in a - // separate pk3 file and the client will need to load the latest cgame.qvm - if ( com_dedicated->integer ) { - SV_TouchCGame(); - } + // we need to touch the cgame and ui qvm because they could be in + // separate pk3 files and the client will need to download the pk3 + // files with the latest cgame and ui qvm to pass the pure check + SV_TouchFile( "vm/cgame.qvm" ); + SV_TouchFile( "vm/ui.qvm" ); } else { Cvar_Set( "sv_paks", "" );