diff options
Diffstat (limited to 'src/files.c')
-rw-r--r-- | src/files.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/files.c b/src/files.c index 0b3de80..d39d595 100644 --- a/src/files.c +++ b/src/files.c @@ -2952,6 +2952,7 @@ void FS_Shutdown( void ) { // disconnected static void fs_game_changed( cvar_t *self ) { char *s = self->string; + qerror_t ret; // validate it if( *s ) { @@ -2981,6 +2982,12 @@ static void fs_game_changed( cvar_t *self ) { #else FS_Restart( qfalse ); #endif + + // exec autoexec.cfg (must be a real file within the game directory) + ret = Cmd_ExecuteFile( COM_AUTOEXECCFG_NAME, FS_TYPE_REAL|FS_PATH_GAME ); + if( ret && ret != Q_ERR_NOENT ) { + Com_WPrintf( "Couldn't exec %s: %s\n", COM_AUTOEXECCFG_NAME, Q_ErrorString( ret ) ); + } } /* |