changed focusing

This commit is contained in:
Christian 2021-01-29 03:18:06 +01:00
parent 35fa091520
commit d0706045d5

View File

@ -200,6 +200,7 @@ public Action bot_check_connect(Handle timer, any data)
Format(msg, sizeof(msg), "connect to ze");
send_socket_msg(msg, strlen(msg));
}
/*
else if (IsValidClient(present) && GetClientCount(false) >= 63)
{
char msg[generic_length];
@ -207,6 +208,7 @@ public Action bot_check_connect(Handle timer, any data)
Format(msg, sizeof(msg), "bot kicked server full");
send_socket_msg(msg, strlen(msg));
}
*/
return Plugin_Continue;
}
@ -549,19 +551,20 @@ public int GetClosestClient_option1(int targeteam)
{
if (!IsAbleToSee(present, i))
continue;
if (is_client_stuck_or_afk(i) && GetClientTeam(i) == GetClientTeam(present))
if (is_client_stuck_or_afk(i))
{
if (i != targethuman)
continue;
target_human_afk_counter++;
if (target_human_afk_counter > 5)
int afk_cap = 15;
if (target_human_afk_counter > afk_cap)
{
target_human_afk_counter = 0;
continue;
}
}
else if (i == targethuman)
target_human_afk_counter = 0;
if (i == targethuman)
return targethuman;
float pos[3];
GetEntPropVector(i, Prop_Send, "m_vecOrigin", pos);
float dist_target = get_power_distance(present, pos);