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.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c
index e539355..f7f663c 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -2089,6 +2089,9 @@ void ExitLevel( void )
int i;
gclient_t *cl;
buildHistory_t *tmp, *mark;
+ char currentmap[ MAX_CVAR_VALUE_STRING ];
+
+ trap_Cvar_VariableStringBuffer( "mapname", currentmap, sizeof( currentmap ));
if( level.mapRotationVoteTime )
{
@@ -2114,7 +2117,9 @@ void ExitLevel( void )
}
}
- if ( G_MapExists( g_nextMap.string ) )
+ if( !Q_stricmp( currentmap, g_nextMap.string ) )
+ trap_SendConsoleCommand( EXEC_APPEND, "map_restart\n" );
+ else if ( G_MapExists( g_nextMap.string ) )
trap_SendConsoleCommand( EXEC_APPEND, va("!map %s\n", g_nextMap.string ) );
else if( G_MapRotationActive( ) )
G_AdvanceMapRotation( );