mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-26 05:52:03 +00:00
Fix client kicked as unpure when missing the latest cgame/ui pk3s
In 2013 ioquake3 stopped referencing the pk3 file that qagame.qvm was loaded from. This had the unintended side affect of causing non-dedicated pure servers to no longer reference a pk3 that only contains the three QVM files. Non-dedicated pure servers did not reference the pk3 containing the latest cgame.qvm so if client did not have the pk3 file they were kicked as unpure instead of the client trying to download the pk3 file. Also make server touch ui.qvm since it's required to pass pure check and may be separate from cgame.qvm.
This commit is contained in:
parent
c0c45d325d
commit
4fa93fbfd4
1 changed files with 7 additions and 11 deletions
|
@ -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", "" );
|
||||
|
|
Loading…
Reference in a new issue