diff --git a/src/action/a_match.c b/src/action/a_match.c index 1ba9adb27..87069106d 100644 --- a/src/action/a_match.c +++ b/src/action/a_match.c @@ -421,6 +421,13 @@ qboolean CheckAbandon(void) if (!matchmode->value || !use_forfeit->value) return false; + /* Treat forfeit_abandon_time <= 0 as "abandonment detection disabled". + * Without this guard, abandonFrames becomes 0 in the registration path, + * the `!level.abandonFrames` branch fires every server tick, and the + * announcement spams the log forever. */ + if (forfeit_abandon_time->value <= 0) + return false; + if (!team_game_going) return false; @@ -908,7 +915,10 @@ void Cmd_CallTimeout_f(edict_t * ent) return; } - if (level.matchTime >= timelimit->value * 60) { + /* Skip the last-round guard when timelimit is unlimited (0). Otherwise + * `matchTime >= 0` is always true and timeouts are blocked permanently + * on unlimited-time servers. */ + if (timelimit->value > 0 && level.matchTime >= timelimit->value * 60) { gi.cprintf(ent, PRINT_HIGH, "You cannot call for a timeout on the last round of the match\n"); return; } diff --git a/src/action/g_save.c b/src/action/g_save.c index 4d93bdd3f..0d0414b33 100644 --- a/src/action/g_save.c +++ b/src/action/g_save.c @@ -490,7 +490,7 @@ void InitGame( void ) mm_allowlock = gi.cvar( "mm_allowlock", "1", CVAR_LATCH ); mm_pausecount = gi.cvar( "mm_allowcount", "3", CVAR_LATCH ); mm_pausetime = gi.cvar( "mm_pausetime", "2", CVAR_LATCH ); - mm_timeoutcount = gi.cvar( "mm_timeoutcount", "1", CVAR_LATCH ); // 1 timeout + mm_timeoutcount = gi.cvar( "mm_timeoutcount", "2", CVAR_LATCH ); // 2 timeouts per team per match mm_timeouttime = gi.cvar( "mm_timeouttime", "60", CVAR_LATCH ); // 60 seconds use_forfeit = gi.cvar( "use_forfeit", "0", 0 ); // Enable forfeit command forfeit_abandon_time = gi.cvar( "forfeit_abandon_time", "60", 0 ); // Abandon timer in seconds