Improved score output

Signed-off-by: GreYFoXGTi <GreYFoXGTi@GMaiL.CoM>
This commit is contained in:
GreYFoXGTi 2010-09-26 19:07:39 +03:00
parent e039cf6f35
commit 0f9ec23884

View file

@ -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)