that team check should be needed

This commit is contained in:
christian 2021-04-10 10:07:48 +02:00
parent b195c60ad7
commit 7ff7ba764d

View File

@ -683,7 +683,7 @@ public int GetClosestClient_option1(int targeteam, int client)
int nearest = -1;
bool bot_alternative = false;
for (int i = 1; i <= MaxClients; i++)
if (IsValidClient(i) && IsPlayerAlive(i) && !is_bot_player(i))
if (IsValidClient(i) && IsPlayerAlive(i) && GetClientTeam(i) == targeteam && !is_bot_player(i))
{
if (!IsAbleToSee(client, i))
continue;