further small changes to targeting
This commit is contained in:
parent
7f7bfb5e80
commit
b195c60ad7
@ -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) && GetClientTeam(i) == targeteam && !(is_bot_player(i)))
|
||||
if (IsValidClient(i) && IsPlayerAlive(i) && !is_bot_player(i))
|
||||
{
|
||||
if (!IsAbleToSee(client, i))
|
||||
continue;
|
||||
@ -709,7 +709,7 @@ public int GetClosestClient_option1(int targeteam, int client)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (bot_alternative && is_bot_player(i))
|
||||
if (bot_alternative && targethuman[client] == i && is_bot_player(i))
|
||||
continue;
|
||||
if (i == targethuman[client])
|
||||
return targethuman[client];
|
||||
|
Loading…
Reference in New Issue
Block a user