mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-29 15:21:54 +00:00
Fix negative frag/capturelimit causing an infinite map end loop
Reported by @vloup.
This commit is contained in:
parent
fc16ac6bd2
commit
0b6d97f849
1 changed files with 12 additions and 0 deletions
|
@ -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 ( g_gametype.integer < GT_CTF && g_fraglimit.integer ) {
|
||||||
if ( level.teamScores[TEAM_RED] >= g_fraglimit.integer ) {
|
if ( level.teamScores[TEAM_RED] >= g_fraglimit.integer ) {
|
||||||
trap_SendServerCommand( -1, "print \"Red hit the fraglimit.\n\"" );
|
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 ( g_gametype.integer >= GT_CTF && g_capturelimit.integer ) {
|
||||||
|
|
||||||
if ( level.teamScores[TEAM_RED] >= g_capturelimit.integer ) {
|
if ( level.teamScores[TEAM_RED] >= g_capturelimit.integer ) {
|
||||||
|
|
Loading…
Reference in a new issue