Permalink
Browse files

Fix script execution time out error

  • Loading branch information...
Bara committed Oct 27, 2018
1 parent 4f640d8 commit feaa6e685130f73c4ac0b495bf8cef5e743db153
Showing with 4 additions and 1 deletion.
  1. +4 −1 addons/sourcemod/scripting/ttt/ttt_spec_menu.sp
@@ -451,9 +451,12 @@ stock int GetNextClient(int client, bool nextClient = true)
int iClient = client + iPlus;
int iBegin = (nextClient ? 1 : MaxClients);
int iLimit = (nextClient ? MaxClients + 1 : 0);
bool bCheck[MAXPLAYERS + 1] = { false, ... };
while (!TTT_IsPlayerAlive(iClient))
while (!TTT_IsPlayerAlive(iClient) && !bCheck[iClient])
{
bCheck[iClient] = true;
// move index; if index == iLimit, move it to the beginning
iClient = (iClient + iPlus == iLimit ? iBegin : iClient + iPlus);

0 comments on commit feaa6e6

Please sign in to comment.