Also pass negative numbers

This commit is contained in:
def 2018-01-21 19:13:20 +01:00
parent a731482152
commit 3033fbb466
2 changed files with 5 additions and 6 deletions

View file

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

View file

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