diff options
Diffstat (limited to 'src/game/g_main.c')
-rw-r--r-- | src/game/g_main.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c index 15a4cb69..4858c75c 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -581,15 +581,20 @@ void G_InitGame( int levelTime, int randomSeed, int restart ) else G_Printf( "Not logging to disk\n" ); + if( g_mapConfigs.string[ 0 ] && !trap_Cvar_VariableIntegerValue( "g_mapConfigsLoaded" ) ) { char map[ MAX_CVAR_VALUE_STRING ] = {""}; + G_Printf( "InitGame: executing map configuration scripts and restarting\n" ); trap_Cvar_VariableStringBuffer( "mapname", map, sizeof( map ) ); G_MapConfigs( map ); + trap_SendConsoleCommand( EXEC_APPEND, "wait\nmap_restart 0\n" ); + } + else + { + // we're done with g_mapConfigs, so reset this for the next map + trap_Cvar_Set( "g_mapConfigsLoaded", "0" ); } - - // we're done with g_mapConfigs, so reset this for the next map - trap_Cvar_Set( "g_mapConfigsLoaded", "0" ); // set this cvar to 0 if it exists, but otherwise avoid its creation if( trap_Cvar_VariableIntegerValue( "g_rangeMarkerWarningGiven" ) ) |