mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Also pass negative numbers
This commit is contained in:
parent
a731482152
commit
3033fbb466
|
@ -367,7 +367,7 @@ void CGameContext::ConTeamTop5(IConsole::IResult *pResult, void *pUserData)
|
|||
return;
|
||||
}
|
||||
|
||||
if (pResult->NumArguments() > 0 && pResult->GetInteger(0) > 0)
|
||||
if (pResult->NumArguments() > 0)
|
||||
pSelf->Score()->ShowTeamTop5(pResult, pResult->m_ClientID, pUserData,
|
||||
pResult->GetInteger(0));
|
||||
else
|
||||
|
@ -398,7 +398,7 @@ void CGameContext::ConTop5(IConsole::IResult *pResult, void *pUserData)
|
|||
return;
|
||||
}
|
||||
|
||||
if (pResult->NumArguments() > 0 && pResult->GetInteger(0) > 0)
|
||||
if (pResult->NumArguments() > 0)
|
||||
pSelf->Score()->ShowTop5(pResult, pResult->m_ClientID, pUserData,
|
||||
pResult->GetInteger(0));
|
||||
else
|
||||
|
@ -1414,7 +1414,7 @@ void CGameContext::ConTopPoints(IConsole::IResult *pResult, void *pUserData)
|
|||
return;
|
||||
}
|
||||
|
||||
if (pResult->NumArguments() > 0 && pResult->GetInteger(0) >= 0)
|
||||
if (pResult->NumArguments() > 0)
|
||||
pSelf->Score()->ShowTopPoints(pResult, pResult->m_ClientID, pUserData,
|
||||
pResult->GetInteger(0));
|
||||
else
|
||||
|
|
|
@ -1075,7 +1075,7 @@ bool CSqlScore::ShowTimesThread(CSqlServer* pSqlServer, const CSqlData *pGameDat
|
|||
return true;
|
||||
|
||||
int LimitStart = abs(pData->m_Num-1);
|
||||
const char *pOrder = pData->m_Num >= 0 ? "ASC" : "DESC";
|
||||
const char *pOrder = pData->m_Num >= 0 ? "DESC" : "ASC";
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -1095,8 +1095,7 @@ bool CSqlScore::ShowTimesThread(CSqlServer* pSqlServer, const CSqlData *pGameDat
|
|||
return true;
|
||||
}
|
||||
|
||||
str_format(aBuf, sizeof(aBuf), "------------ Last Times No %d - %d ------------", pData->m_Num, pData->m_Num + (int)pSqlServer->GetResults()->rowsCount() - 1);
|
||||
pData->GameServer()->SendChatTarget(pData->m_ClientID, aBuf);
|
||||
pData->GameServer()->SendChatTarget(pData->m_ClientID, "------------- Last Times -------------");
|
||||
|
||||
float pTime = 0;
|
||||
int pSince = 0;
|
||||
|
|
Loading…
Reference in a new issue