Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/action/a_match.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/action/g_save.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down