Format seconds now. (#414)

This commit is contained in:
shavitush 2017-07-28 20:00:41 +03:00
parent 7a25dedadb
commit c47903e11e
3 changed files with 17 additions and 4 deletions

View File

@ -619,7 +619,10 @@ public Action Command_Style(int client, int args)
if(time > 0.0)
{
FormatEx(sDisplay, 64, "%s - WR: %.01f", gS_StyleStrings[i][sStyleName], time);
char[] sTime = new char[32];
FormatSeconds(time, sTime, 32, false);
FormatEx(sDisplay, 64, "%s - WR: %s", gS_StyleStrings[i][sStyleName], sTime);
}
else
@ -1349,6 +1352,7 @@ bool LoadStyles()
kv.GetString("shortname", gS_StyleStrings[i][sShortName], 128, "<MISSING SHORT STYLE NAME>");
kv.GetString("htmlcolor", gS_StyleStrings[i][sHTMLColor], 128, "<MISSING STYLE HTML COLOR>");
kv.GetString("command", gS_StyleStrings[i][sChangeCommand], 128, "");
PrintToServer("%s", gS_StyleStrings[i][sChangeCommand]);
kv.GetString("clantag", gS_StyleStrings[i][sClanTag], 128, "<MISSING STYLE CLAN TAG>");
gA_StyleSettings[i][bAutobhop] = view_as<bool>(kv.GetNum("autobhop", 1));

View File

@ -1210,7 +1210,10 @@ public Action Command_DeleteReplay(int client, int args)
if(time > 0.0)
{
FormatEx(sDisplay, 64, "%s - WR: %.01f", gS_StyleStrings[i][sStyleName], time);
char[] sTime = new char[32];
FormatSeconds(time, sTime, 32, false);
FormatEx(sDisplay, 64, "%s - WR: %s", gS_StyleStrings[i][sStyleName], sTime);
}
else
@ -1367,7 +1370,10 @@ Action OpenReplayMenu(int client)
if(time > 0.0)
{
FormatEx(sDisplay, 64, "%s - WR: %.01f", gS_StyleStrings[i][sStyleName], time);
char[] sTime = new char[32];
FormatSeconds(time, sTime, 32, false);
FormatEx(sDisplay, 64, "%s - WR: %s", gS_StyleStrings[i][sStyleName], sTime);
}
else

View File

@ -1107,7 +1107,10 @@ Action ShowWRStyleMenu(int client)
if(gF_WRTime[i] > 0.0)
{
FormatEx(sDisplay, 64, "%s - WR: %.01f", gS_StyleStrings[i][sStyleName], gF_WRTime[i]);
char[] sTime = new char[32];
FormatSeconds(gF_WRTime[i], sTime, 32, false);
FormatEx(sDisplay, 64, "%s - WR: %s", gS_StyleStrings[i][sStyleName], sTime);
}
else