Centisecs -> Decisecs

This commit is contained in:
def 2014-12-02 13:55:19 +01:00
parent 6b12cc6f73
commit 0947de4b3f
2 changed files with 4 additions and 4 deletions

View file

@ -278,7 +278,7 @@ MACRO_CONFIG_INT(ClRaceGhost, cl_race_ghost, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAV
MACRO_CONFIG_INT(ClRaceShowGhost, cl_race_show_ghost, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show ghost")
MACRO_CONFIG_INT(ClRaceSaveGhost, cl_race_save_ghost, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Save ghost")
MACRO_CONFIG_INT(ClDDRaceScoreBoard, cl_ddrace_scoreboard, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Enable DDRace Scoreboard ")
MACRO_CONFIG_INT(ClShowCentisecs, cl_show_centisecs, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Show centiseconds in game time")
MACRO_CONFIG_INT(ClShowDecisecs, cl_show_decisecs, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Show deciseconds in game time")
MACRO_CONFIG_INT(SvResetPickups, sv_reset_pickups, 0, 0, 1, CFGFLAG_SERVER, "Whether the weapons are reset on passing the start tile or not")
MACRO_CONFIG_INT(ClShowOthers, cl_show_others, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show players in other teams")
MACRO_CONFIG_INT(ClShowOthersAlpha, cl_show_others_alpha, 40, 0, 100, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show players in other teams (alpha value, 0 invisible, 100 fully visible)")

View file

@ -62,19 +62,19 @@ void CHud::RenderGameTimer()
bool IsGameTypeRace = str_find_nocase(Info.m_aGameType, "race") || str_find_nocase(Info.m_aGameType, "fastcap");
bool IsGameTypeDDRace = str_find_nocase(Info.m_aGameType, "ddrace") || str_find_nocase(Info.m_aGameType, "mkrace");
if(Time <= 0 && g_Config.m_ClShowCentisecs)
if(Time <= 0 && g_Config.m_ClShowDecisecs)
str_format(Buf, sizeof(Buf), "00:00.0");
else if(Time <= 0)
str_format(Buf, sizeof(Buf), "00:00");
else if(IsGameTypeRace && !IsGameTypeDDRace && m_ServerRecord >= 0)
str_format(Buf, sizeof(Buf), "%02d:%02d", (int)(m_ServerRecord*100)/60, ((int)(m_ServerRecord*100)%60));
else if(g_Config.m_ClShowCentisecs)
else if(g_Config.m_ClShowDecisecs)
str_format(Buf, sizeof(Buf), "%02d:%02d.%d", Time/60, Time%60, m_DDRaceTick/10);
else
str_format(Buf, sizeof(Buf), "%02d:%02d", Time/60, Time%60);
float FontSize = 10.0f;
float w;
if(g_Config.m_ClShowCentisecs)
if(g_Config.m_ClShowDecisecs)
w = TextRender()->TextWidth(0, 12,"00:00.0",-1);
else
w = TextRender()->TextWidth(0, 12,"00:00",-1);