- Add unset command for cvars created by the user
- Fix crash bug when maximum number of cvars has been reached - Fix cvar_restart - Add possibility to cleanly switch mods ingame (#2819)
This commit is contained in:
parent
606ce66726
commit
258429efe7
8 changed files with 414 additions and 143 deletions
|
@ -248,7 +248,7 @@ static searchpath_t *fs_searchpaths;
|
|||
static int fs_readCount; // total bytes read
|
||||
static int fs_loadCount; // total files read
|
||||
static int fs_loadStack; // total files in memory
|
||||
static int fs_packFiles; // total number of files in packs
|
||||
static int fs_packFiles = 0; // total number of files in packs
|
||||
|
||||
static int fs_checksumFeed;
|
||||
|
||||
|
@ -280,7 +280,7 @@ static fileHandleData_t fsh[MAX_FILE_HANDLES];
|
|||
static qboolean fs_reordered;
|
||||
|
||||
// never load anything from pk3 files that are not present at the server when pure
|
||||
static int fs_numServerPaks;
|
||||
static int fs_numServerPaks = 0;
|
||||
static int fs_serverPaks[MAX_SEARCH_PATHS]; // checksums
|
||||
static char *fs_serverPakNames[MAX_SEARCH_PATHS]; // pk3 names
|
||||
|
||||
|
@ -2802,6 +2802,8 @@ static void FS_Startup( const char *gameName )
|
|||
|
||||
Com_Printf( "----- FS_Startup -----\n" );
|
||||
|
||||
fs_packFiles = 0;
|
||||
|
||||
fs_debug = Cvar_Get( "fs_debug", "0", 0 );
|
||||
fs_basepath = Cvar_Get ("fs_basepath", Sys_DefaultInstallPath(), CVAR_INIT );
|
||||
fs_basegame = Cvar_Get ("fs_basegame", "", CVAR_INIT );
|
||||
|
@ -3437,11 +3439,20 @@ FS_ConditionalRestart
|
|||
restart if necessary
|
||||
=================
|
||||
*/
|
||||
qboolean FS_ConditionalRestart( int checksumFeed ) {
|
||||
if( fs_gamedirvar->modified || checksumFeed != fs_checksumFeed ) {
|
||||
FS_Restart( checksumFeed );
|
||||
qboolean FS_ConditionalRestart(int checksumFeed)
|
||||
{
|
||||
if(fs_gamedirvar->modified)
|
||||
{
|
||||
Com_GameRestart(checksumFeed, qfalse);
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
else if(checksumFeed != fs_checksumFeed)
|
||||
{
|
||||
FS_Restart(checksumFeed);
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue