diff options
| author | Johannes Loher <ghost91@gmx.net> | 2011-06-30 12:20:12 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-07-01 18:34:28 +0200 |
| commit | 3f583d44f9fe85aa326ca0cdb89755a36eba2579 (patch) | |
| tree | e90360aea0aa20525d536818e2fae4c43746aef5 /src/game/client | |
| parent | ca7c82f649fea5f877ae4156387c4ad30d79d6b6 (diff) | |
| download | zcatch-3f583d44f9fe85aa326ca0cdb89755a36eba2579.tar.gz zcatch-3f583d44f9fe85aa326ca0cdb89755a36eba2579.zip | |
fixed so there can't be a negative time being displayed when timelimit runs out while there is warmup. If warmup is active, the time will be displayed as if there was no timelimit.
Diffstat (limited to 'src/game/client')
| -rw-r--r-- | src/game/client/components/hud.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/client/components/hud.cpp b/src/game/client/components/hud.cpp index 188691a1..58fc75b9 100644 --- a/src/game/client/components/hud.cpp +++ b/src/game/client/components/hud.cpp @@ -35,7 +35,7 @@ void CHud::RenderGameTimer() { char Buf[32]; int Time = 0; - if(m_pClient->m_Snap.m_pGameInfoObj->m_TimeLimit) + if(m_pClient->m_Snap.m_pGameInfoObj->m_TimeLimit && !m_pClient->m_Snap.m_pGameInfoObj->m_WarmupTimer) { Time = m_pClient->m_Snap.m_pGameInfoObj->m_TimeLimit*60 - ((Client()->GameTick()-m_pClient->m_Snap.m_pGameInfoObj->m_RoundStartTick)/Client()->GameTickSpeed()); @@ -49,7 +49,7 @@ void CHud::RenderGameTimer() float FontSize = 10.0f; float w = TextRender()->TextWidth(0, FontSize, Buf, -1); // last 60 sec red, last 10 sec blink - if(m_pClient->m_Snap.m_pGameInfoObj->m_TimeLimit && Time <= 60) + if(m_pClient->m_Snap.m_pGameInfoObj->m_TimeLimit && Time <= 60 && !m_pClient->m_Snap.m_pGameInfoObj->m_WarmupTimer) { float Alpha = Time <= 10 && (2*time_get()/time_freq()) % 2 ? 0.5f : 1.0f; TextRender()->TextColor(1.0f, 0.25f, 0.25f, Alpha); |