summaryrefslogtreecommitdiff
path: root/src/game/g_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_main.c')
-rw-r--r--src/game/g_main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c
index 0bda0a97..abeb2631 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -114,6 +114,7 @@ vmCvar_t g_markDeconstruct;
vmCvar_t g_debugMapRotation;
vmCvar_t g_currentMapRotation;
vmCvar_t g_currentMap;
+vmCvar_t g_nextMap;
vmCvar_t g_initialMapRotation;
vmCvar_t g_debugVoices;
@@ -253,6 +254,7 @@ static cvarTable_t gameCvarTable[ ] =
{ &g_debugMapRotation, "g_debugMapRotation", "0", 0, 0, qfalse },
{ &g_currentMapRotation, "g_currentMapRotation", "-1", 0, 0, qfalse }, // -1 = NOT_ROTATING
{ &g_currentMap, "g_currentMap", "0", 0, 0, qfalse },
+ { &g_nextMap, "g_nextMap", "", 0 , 0, qtrue },
{ &g_initialMapRotation, "g_initialMapRotation", "", CVAR_ARCHIVE, 0, qfalse },
{ &g_debugVoices, "g_debugVoices", "0", 0, 0, qfalse },
{ &g_voiceChats, "g_voiceChats", "1", CVAR_ARCHIVE, 0, qfalse },
@@ -1615,11 +1617,15 @@ void ExitLevel( void )
int i;
gclient_t *cl;
- if( G_MapRotationActive( ) )
+ if ( G_MapExists( g_nextMap.string ) )
+ trap_SendConsoleCommand( EXEC_APPEND, va("map %s\n", g_nextMap.string ) );
+ else if( G_MapRotationActive( ) )
G_AdvanceMapRotation( );
else
trap_SendConsoleCommand( EXEC_APPEND, "map_restart\n" );
+ trap_Cvar_Set( "g_nextMap", "" );
+
level.restarted = qtrue;
level.changemap = NULL;
level.intermissiontime = 0;