mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Improved score output
Signed-off-by: GreYFoXGTi <GreYFoXGTi@GMaiL.CoM>
This commit is contained in:
parent
e039cf6f35
commit
0f9ec23884
|
@ -255,13 +255,12 @@ void CFileScore::ShowRank(int ClientID, const char* pName, bool Search)
|
|||
float Time = pScore->m_Score;
|
||||
char aClientName[128];
|
||||
str_format(aClientName, sizeof(aClientName), " (%s)", Server()->ClientName(ClientID));
|
||||
if(!g_Config.m_SvHideScore)
|
||||
if(g_Config.m_SvHideScore)
|
||||
str_format(aBuf, sizeof(aBuf), "Your time: %d minute(s) %5.2f second(s)", (int)Time/60, Time-((int)Time/60*60));
|
||||
else
|
||||
str_format(aBuf, sizeof(aBuf), "%d. %s Time: %d minute(s) %5.2f second(s)", Pos, pScore->m_aName, (int)Time/60, Time-((int)Time/60*60));
|
||||
if(Search)
|
||||
strcat(aBuf, aClientName);
|
||||
GameServer()->SendChat(-1, CGameContext::CHAT_ALL, aBuf);
|
||||
if (!Search) GameServer()->SendChat(-1, CGameContext::CHAT_ALL, aBuf);
|
||||
else GameServer()->SendChatTarget( ClientID, aBuf);
|
||||
return;
|
||||
}
|
||||
else if(Pos == -1)
|
||||
|
|
Loading…
Reference in a new issue