Skip to content

Commit c3dfcd2

Browse files
authored
Merge pull request #181 from NongBenz/main
spectator-gui: fix team score stuck at 0, fix round timer display truncated
2 parents 6a9023c + 35106d7 commit c3dfcd2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cl_dll/hud/spectator_gui.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ void CHudSpectatorGui::CalcAllNeededData( )
258258

259259
label.m_iCounterTerrorists = 0;
260260
label.m_iTerrorists = 0;
261-
for( int i = 0; i < gHUD.m_Scoreboard.m_iNumTeams; i++ )
261+
for( int i = 1; i <= gHUD.m_Scoreboard.m_iNumTeams; i++ )
262262
{
263263
switch( g_TeamInfo[i].teamnumber )
264264
{
@@ -278,7 +278,7 @@ void CHudSpectatorGui::CalcAllNeededData( )
278278
int iMinutes = max( 0, (int)( gHUD.m_Timer.m_iTime + gHUD.m_Timer.m_fStartTime - gHUD.m_flTime ) / 60);
279279
int iSeconds = max( 0, (int)( gHUD.m_Timer.m_iTime + gHUD.m_Timer.m_fStartTime - gHUD.m_flTime ) - (iMinutes * 60));
280280

281-
sprintf( label.m_szTimer, "%i:%i", iMinutes, iSeconds );
281+
sprintf( label.m_szTimer, "%i:%02i", iMinutes, iSeconds );
282282
}
283283

284284
// player name

0 commit comments

Comments
 (0)