diff --git a/AutismBotIngame/scripting/autism_bot_info.sp b/AutismBotIngame/scripting/autism_bot_info.sp index b81b394e..36ba6702 100644 --- a/AutismBotIngame/scripting/autism_bot_info.sp +++ b/AutismBotIngame/scripting/autism_bot_info.sp @@ -305,63 +305,17 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float TR_GetEndPosition(ground_pos); ground_distance = GetVectorDistance(feet_origin, ground_pos); float forward_distance = GetVectorDistance(feet_origin, ground_pos); - if (forward_distance > 280) + if (forward_distance > 250) { - float velocity[3]; - GetEntPropVector(client, Prop_Data, "m_vecVelocity", velocity); - NegateVector(velocity); - if (velocity[0] > 0) - velocity[0] += 850; - else - velocity[0] -= 850; - if (velocity[1] > 0) - velocity[1] += 850; - else - velocity[1] -= 850; - velocity[2] += 150; - TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, velocity); + float ClientPos[3]; + float Result[3]; + GetClientEyePosition(client, ClientPos); + MakeVectorFromPoints(ClientPos, ground_pos, Result); + NegateVector(Result); + GetVectorAngles(Result, Result); + TeleportEntity(client, NULL_VECTOR, Result, NULL_VECTOR); } } - - - - /* - TR_TraceRayFilter(feet_origin, angles_eye, MASK_ALL, RayType_Infinite, TraceRayDontHitSelf, client); - if (TR_DidHit()) - { - TR_GetEndPosition(ground_pos); - feet_origin[2] -= 10.0; - float forward_distance = GetVectorDistance(feet_origin, ground_pos); - if (forward_distance > 280) - { - if (IsValidClient(targethuman[client])) - { - float feet_origin_pre[3], human_feet_origin[3]; - GetClientAbsOrigin(client, feet_origin_pre); - GetClientAbsOrigin(targethuman[client], human_feet_origin); - if (feet_origin_pre[2] - 200 > human_feet_origin[2]) - { - buttons_old[client] = buttons; - flags_old[client] = flags; - return; - } - } - float velocity[3]; - GetEntPropVector(client, Prop_Data, "m_vecVelocity", velocity); - NegateVector(velocity); - if (velocity[0] > 0) - velocity[0] += 450; - else - velocity[0] -= 450; - if (velocity[1] > 0) - velocity[1] += 450; - else - velocity[1] -= 450; - velocity[2] += 150; - TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, velocity); - } - } - */ } } TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, Vel);