optimize even further

This commit is contained in:
shavitush 2016-07-24 18:29:05 +03:00
parent d3d6ccfb0d
commit 31ca3d7e4f
2 changed files with 3 additions and 3 deletions

View File

@ -689,7 +689,7 @@ public int Native_RestartTimer(Handle handler, int numParams)
public void StartTimer(int client) public void StartTimer(int client)
{ {
if(!IsValidClient(client) || IsFakeClient(client)) if(!IsValidClient(client, true) || GetClientTeam(client) < 2 || IsFakeClient(client))
{ {
return; return;
} }

View File

@ -1351,7 +1351,7 @@ public void SQL_UpdateLeaderboards_Callback(Database db, DBResultSet results, co
public int GetRankForTime(BhopStyle style, float time) public int GetRankForTime(BhopStyle style, float time)
{ {
for(int i = 0; i < gA_LeaderBoard[style].Length; i++) for(int i = 0; i < gI_RecordAmount[style]; i++)
{ {
if(time < gA_LeaderBoard[style].Get(i)) if(time < gA_LeaderBoard[style].Get(i))
{ {
@ -1359,5 +1359,5 @@ public int GetRankForTime(BhopStyle style, float time)
} }
} }
return gA_LeaderBoard[style].Length + 1; return gI_RecordAmount[style] + 1;
} }