diff --git a/code/game/g_main.c b/code/game/g_main.c index 63e93e07..4398113e 100644 --- a/code/game/g_main.c +++ b/code/game/g_main.c @@ -1380,6 +1380,12 @@ void CheckExitRules( void ) { } } + if ( g_fraglimit.integer < 0 ) { + G_Printf( "fraglimit %i is out of range, defaulting to 0\n", g_fraglimit.integer ); + trap_Cvar_Set( "fraglimit", "0" ); + trap_Cvar_Update( &g_fraglimit ); + } + if ( g_gametype.integer < GT_CTF && g_fraglimit.integer ) { if ( level.teamScores[TEAM_RED] >= g_fraglimit.integer ) { trap_SendServerCommand( -1, "print \"Red hit the fraglimit.\n\"" ); @@ -1411,6 +1417,12 @@ void CheckExitRules( void ) { } } + if ( g_capturelimit.integer < 0 ) { + G_Printf( "capturelimit %i is out of range, defaulting to 0\n", g_capturelimit.integer ); + trap_Cvar_Set( "capturelimit", "0" ); + trap_Cvar_Update( &g_capturelimit ); + } + if ( g_gametype.integer >= GT_CTF && g_capturelimit.integer ) { if ( level.teamScores[TEAM_RED] >= g_capturelimit.integer ) {