mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 15:08:19 +00:00
Finish time in HUD: Show hours
This commit is contained in:
parent
b3769a069c
commit
0748ad7a6b
|
@ -943,7 +943,10 @@ void CHud::RenderDDRaceEffects()
|
|||
char aBuf[64];
|
||||
if(m_FinishTime)
|
||||
{
|
||||
str_format(aBuf, sizeof(aBuf), "Finish time: %02d:%02d.%02d", m_DDRaceTime / 6000, m_DDRaceTime / 100 - m_DDRaceTime / 6000 * 60, m_DDRaceTime % 100);
|
||||
if(m_DDRaceTime > 360000)
|
||||
str_format(aBuf, sizeof(aBuf), "Finish time: %02d:%02d:%02d.%02d", m_DDRaceTime / 360000, (m_DDRaceTime % 360000) / 6000, m_DDRaceTime / 100 - m_DDRaceTime / 6000 * 60, m_DDRaceTime % 100);
|
||||
else
|
||||
str_format(aBuf, sizeof(aBuf), "Finish time: %02d:%02d.%02d", m_DDRaceTime / 6000, m_DDRaceTime / 100 - m_DDRaceTime / 6000 * 60, m_DDRaceTime % 100);
|
||||
TextRender()->Text(0, 150 * Graphics()->ScreenAspect() - TextRender()->TextWidth(0, 12, aBuf, -1, -1.0f) / 2, 20, 12, aBuf, -1.0f);
|
||||
}
|
||||
else if(m_CheckpointTick + Client()->GameTickSpeed() * 6 > Client()->GameTick(g_Config.m_ClDummy))
|
||||
|
|
Loading…
Reference in a new issue