Finish time in HUD: Show hours

This commit is contained in:
def 2020-10-18 17:57:02 +02:00
parent b3769a069c
commit 0748ad7a6b

View file

@ -943,6 +943,9 @@ void CHud::RenderDDRaceEffects()
char aBuf[64];
if(m_FinishTime)
{
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);
}