further minor updates

This commit is contained in:
christian 2021-04-20 01:24:04 +02:00
parent 637c3afbda
commit aaf43eca6f

View File

@ -408,7 +408,7 @@ public Action recursive_pressing(Handle timer, any data)
GetEntPropVector(target_enemy[client], Prop_Send, "m_vecOrigin", pos); GetEntPropVector(target_enemy[client], Prop_Send, "m_vecOrigin", pos);
enemy_distance = get_power_distance(client, pos); enemy_distance = get_power_distance(client, pos);
} }
if ((0 < enemy_distance && targeteam == 2) || dist_target < 0 < enemy_distance) if ((250 > enemy_distance && targeteam == 2) || dist_target < 0 < enemy_distance)
{ {
/* /*
float feet_origin[3], enemy_feet_origin[3]; float feet_origin[3], enemy_feet_origin[3];
@ -418,7 +418,7 @@ public Action recursive_pressing(Handle timer, any data)
*/ */
face_call(target_enemy[client], client); face_call(target_enemy[client], client);
} }
else if (0 < dist_target) else if (IsValidClient(targethuman[client]))
face_call(targethuman[client], client); face_call(targethuman[client], client);
trace_hulling_bot(client); trace_hulling_bot(client);
char message[generic_length * 7]; char message[generic_length * 7];
@ -687,8 +687,8 @@ public int GetClosestClient_option1(int targeteam, int client)
for (int i = 1; i <= MaxClients; i++) for (int i = 1; i <= MaxClients; i++)
if (IsValidClient(i) && IsPlayerAlive(i) && GetClientTeam(i) == targeteam && !is_bot_player(i)) if (IsValidClient(i) && IsPlayerAlive(i) && GetClientTeam(i) == targeteam && !is_bot_player(i))
{ {
if (!IsAbleToSee(client, i)) /*if (!IsAbleToSee(client, i))
continue; continue;*/
if (is_client_stuck_or_afk(i)) if (is_client_stuck_or_afk(i))
continue; continue;
bot_alternative = true; bot_alternative = true;
@ -697,8 +697,10 @@ public int GetClosestClient_option1(int targeteam, int client)
for (int i = 1; i <= MaxClients; i++) for (int i = 1; i <= MaxClients; i++)
if (IsValidClient(i) && IsPlayerAlive(i) && i != client && GetClientTeam(i) == targeteam) if (IsValidClient(i) && IsPlayerAlive(i) && i != client && GetClientTeam(i) == targeteam)
{ {
/*
if (!IsAbleToSee(client, i)) if (!IsAbleToSee(client, i))
continue; continue;
*/
if (is_client_stuck_or_afk(i)) if (is_client_stuck_or_afk(i))
{ {
if (i != targethuman[client]) if (i != targethuman[client])
@ -711,10 +713,11 @@ public int GetClosestClient_option1(int targeteam, int client)
continue; continue;
} }
} }
if (bot_alternative && targethuman[client] == i && is_bot_player(i)) if (bot_alternative && is_bot_player(i))
continue; continue;
/*
if (i == targethuman[client]) if (i == targethuman[client])
return targethuman[client]; return targethuman[client];*/
float pos[3]; float pos[3];
GetEntPropVector(i, Prop_Send, "m_vecOrigin", pos); GetEntPropVector(i, Prop_Send, "m_vecOrigin", pos);
float dist_target = get_power_distance(client, pos); float dist_target = get_power_distance(client, pos);
@ -725,8 +728,10 @@ public int GetClosestClient_option1(int targeteam, int client)
for (int j = 1; j <= MaxClients; j++) for (int j = 1; j <= MaxClients; j++)
if (IsValidClient(j) && IsPlayerAlive(j) && GetClientTeam(j) == 2) if (IsValidClient(j) && IsPlayerAlive(j) && GetClientTeam(j) == 2)
{ {
/*
if (!IsAbleToSee(i, j)) if (!IsAbleToSee(i, j))
continue; continue;
*/
if (is_client_stuck_or_afk(j)) if (is_client_stuck_or_afk(j))
continue; continue;
dist_target += 250.0; dist_target += 250.0;