Skip to content

Commit

Permalink
Randomize array in TTT_GetRandomPlayer
Browse files Browse the repository at this point in the history
  • Loading branch information
Bara committed Oct 28, 2018
1 parent ad9011a commit 791fc12
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addons/sourcemod/scripting/include/ttt.inc
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,8 @@ stock int TTT_GetRandomPlayer(bool alive = true, int targetRole = -1)
return -1;
}

SortIntegers(clients, sizeof(clients), Sort_Random);

return clients[GetRandomInt(0, clientCount-1)];
}

Expand Down

0 comments on commit 791fc12

Please sign in to comment.