This commit is contained in:
Bradasparky 2025-12-16 21:26:17 +00:00 committed by GitHub
commit e9cc1e2004
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -88,6 +88,7 @@ ConVar mp_timelimit( "mp_timelimit", "0", FCVAR_NOTIFY|FCVAR_REPLICATED, "game t
, MPTimeLimitCallback
#endif
);
ConVar mp_timelimit_min( "mp_timelimit_min", "5", FCVAR_NOTIFY|FCVAR_REPLICATED, "Minimum timelimit (in minutes) when the map should end after a round ends." );
ConVar fraglimit( "mp_fraglimit","0", FCVAR_NOTIFY|FCVAR_REPLICATED, "The number of kills at which the map ends");

View File

@ -1170,9 +1170,8 @@ bool CTeamplayRoundBasedRules::CheckTimeLimit( bool bAllowEnd /*= true*/ )
if ( ( mp_timelimit.GetInt() > 0 && CanChangelevelBecauseOfTimeLimit() ) || m_bChangelevelAfterStalemate )
{
// If there's less than 5 minutes to go, just switch now. This avoids the problem
// of sudden death modes starting shortly after a new round starts.
const int iMinTime = 5;
extern ConVar mp_timelimit_min;
int iMinTime = mp_timelimit_min.GetInt();
bool bSwitchDueToTime = ( mp_timelimit.GetInt() > iMinTime && GetTimeLeft() < (iMinTime * 60) );
if ( IsInTournamentMode() == true )