diff options
Diffstat (limited to 'src/qcommon/common.c')
-rw-r--r-- | src/qcommon/common.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/qcommon/common.c b/src/qcommon/common.c index c08ea8a0..acf1b2f0 100644 --- a/src/qcommon/common.c +++ b/src/qcommon/common.c @@ -474,7 +474,7 @@ void Com_StartupVariable( const char *match ) { if(Cvar_Flags(s) == CVAR_NONEXISTENT) Cvar_Get(s, Cmd_Argv(2), CVAR_USER_CREATED); else - Cvar_Set(s, Cmd_Argv(2)); + Cvar_Set2(s, Cmd_Argv(2), qfalse); } } } @@ -2390,9 +2390,10 @@ void Com_GameRestart(int checksumFeed, qboolean disconnect) // make sure no recursion can be triggered if(!com_gameRestarting && com_fullyInitialized) { - int clWasRunning = com_cl_running->integer; + int clWasRunning; com_gameRestarting = qtrue; + clWasRunning = com_cl_running->integer; // Kill server if we have one if(com_sv_running->integer) @@ -2440,7 +2441,16 @@ Expose possibility to change current running mod to the user void Com_GameRestart_f(void) { - Cvar_Set("fs_game", Cmd_Argv(1)); + if(!FS_FilenameCompare(Cmd_Argv(1), BASEGAME)) + { + // This is the standard base game. Servers and clients should + // use "" and not the standard basegame name because this messes + // up pak file negotiation and lots of other stuff + + Cvar_Set("fs_game", ""); + } + else + Cvar_Set("fs_game", Cmd_Argv(1)); Com_GameRestart(0, qtrue); } @@ -2575,7 +2585,6 @@ void Com_Init( char *commandLine ) { com_homepath = Cvar_Get("com_homepath", "", CVAR_INIT); - // Com_StartupVariable( FS_InitFilesystem (); Com_InitJournaling(); |