From d0706045d52f8d45670af8835703e53394b81520 Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 29 Jan 2021 03:18:06 +0100 Subject: [PATCH] changed focusing --- AutismBotIngame/scripting/autism_bot_info.sp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/AutismBotIngame/scripting/autism_bot_info.sp b/AutismBotIngame/scripting/autism_bot_info.sp index 5d56605a..3d9f8a8f 100644 --- a/AutismBotIngame/scripting/autism_bot_info.sp +++ b/AutismBotIngame/scripting/autism_bot_info.sp @@ -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);