summaryrefslogtreecommitdiff
path: root/src/qcommon/files.c
diff options
context:
space:
mode:
authorThilo Schulz <arny@ats.s.bawue.de>2011-06-22 23:00:36 +0000
committerTim Angus <tim@ngus.net>2013-01-10 21:51:33 +0000
commitaa3e32997bf3decdce451c8a6a915c27a489d84c (patch)
treec0077358b9a622796d6cf50ccd009dcec39bf5ae /src/qcommon/files.c
parent1e5a28cf92afc069a38fd42f58dcdcd803ca2fe1 (diff)
- Automatically reset fs_game to "" if it was supplied by the user and is equal to com_basegame - Fix problem where users could change values of CVAR_INIT variables after the call to Cvar_Get() via Com_StartupVariable() - Move sound shutdown after client shutdown so VMs don't hold invalid sound handles in memory
Diffstat (limited to 'src/qcommon/files.c')
-rw-r--r--src/qcommon/files.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qcommon/files.c b/src/qcommon/files.c
index c11e9ba8..8e32c9ff 100644
--- a/src/qcommon/files.c
+++ b/src/qcommon/files.c
@@ -3512,9 +3512,12 @@ void FS_InitFilesystem( void ) {
// we have to specially handle this, because normal command
// line variable sets don't happen until after the filesystem
// has already been initialized
- Com_StartupVariable( "fs_basepath" );
- Com_StartupVariable( "fs_homepath" );
- Com_StartupVariable( "fs_game" );
+ Com_StartupVariable("fs_basepath");
+ Com_StartupVariable("fs_homepath");
+ Com_StartupVariable("fs_game");
+
+ if(!FS_FilenameCompare(Cvar_VariableString("fs_game"), BASEGAME))
+ Cvar_Set("fs_game", "");
// try to start up normally
FS_Startup( BASEGAME );