mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
1 point, many points
This commit is contained in:
parent
6406e77e9c
commit
3b8645ae98
|
@ -509,7 +509,10 @@ void CSqlScore::MapPointsThread(void *pUser)
|
||||||
char aServer[32];
|
char aServer[32];
|
||||||
strcpy(aServer, pData->m_pSqlData->m_pResults->getString("Server").c_str());
|
strcpy(aServer, pData->m_pSqlData->m_pResults->getString("Server").c_str());
|
||||||
aServer[0] = toupper(aServer[0]);
|
aServer[0] = toupper(aServer[0]);
|
||||||
str_format(aBuf, sizeof(aBuf), "\"%s\" on %s (%d points)", aMap, aServer, points);
|
if (points == 1)
|
||||||
|
str_format(aBuf, sizeof(aBuf), "\"%s\" on %s (%d point)", aMap, aServer, points);
|
||||||
|
else
|
||||||
|
str_format(aBuf, sizeof(aBuf), "\"%s\" on %s (%d points)", aMap, aServer, points);
|
||||||
}
|
}
|
||||||
|
|
||||||
pData->m_pSqlData->GameServer()->SendChatTarget(pData->m_ClientID, aBuf);
|
pData->m_pSqlData->GameServer()->SendChatTarget(pData->m_ClientID, aBuf);
|
||||||
|
@ -559,7 +562,10 @@ void CSqlScore::SaveScoreThread(void *pUser)
|
||||||
{
|
{
|
||||||
pData->m_pSqlData->m_pResults->next();
|
pData->m_pSqlData->m_pResults->next();
|
||||||
int points = (int)pData->m_pSqlData->m_pResults->getInt("Points");
|
int points = (int)pData->m_pSqlData->m_pResults->getInt("Points");
|
||||||
str_format(aBuf, sizeof(aBuf), "You earned %d points for finishing this map!", points);
|
if (points == 1)
|
||||||
|
str_format(aBuf, sizeof(aBuf), "You earned %d point for finishing this map!", points);
|
||||||
|
else
|
||||||
|
str_format(aBuf, sizeof(aBuf), "You earned %d points for finishing this map!", points);
|
||||||
pData->m_pSqlData->GameServer()->SendChatTarget(pData->m_ClientID, aBuf);
|
pData->m_pSqlData->GameServer()->SendChatTarget(pData->m_ClientID, aBuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue