Skip to content

Commit

Permalink
More fixed pause timer fixes. (#772)
Browse files Browse the repository at this point in the history
Updates pausesLeft in Pause call for UI.

Do not update pause time used on round restore as well.

Confirmed working by Kancha in the Discord as well.
  • Loading branch information
PhlexPlexico authored Jul 10, 2022
1 parent 92e0fb9 commit 4460f01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripting/get5/matchconfig.sp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ stock bool LoadMatchConfig(const char[] config, bool restoreBackup = false) {
g_TeamSeriesScores[team] = 0;
g_TeamReadyForUnpause[team] = false;
g_TeamGivenStopCommand[team] = false;
g_TeamPauseTimeUsed[team] = 0;
// We only reset these on a new game.
// During restore we want to keep our
// current pauses used.
if (!restoreBackup) {
g_TeamPauseTimeUsed[team] = 0;
g_TeamPausesUsed[team] = 0;
g_TeamTechPausesUsed[team] = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion scripting/get5/pausing.sp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public Action Command_Pause(int client, int args) {
}

// If the pause will need explicit resuming, we will create a timer to poll the pause status.
bool need_resume = Pause(PauseType_Tactical, g_FixedPauseTimeCvar.IntValue, MatchTeamToCSTeam(team));
bool need_resume = Pause(PauseType_Tactical, g_FixedPauseTimeCvar.IntValue, MatchTeamToCSTeam(team), pausesLeft);
EventLogger_PauseCommand(team, PauseType_Tactical);
LogDebug("Calling Get5_OnMatchPaused(team=%d, pauseReason=%d)", team, PauseType_Tactical);
Call_StartForward(g_OnMatchPaused);
Expand Down

0 comments on commit 4460f01

Please sign in to comment.