From 6ba417813e90c47f1576a0cdb3909864961ed9f7 Mon Sep 17 00:00:00 2001 From: MasterCatPL <107404623+MasterCatPL@users.noreply.github.com> Date: Sun, 14 Apr 2024 19:07:16 +0200 Subject: [PATCH] fixed automelee targeting ubered players --- src/hacks/NavBot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hacks/NavBot.cpp b/src/hacks/NavBot.cpp index 32ed3f73..aec7a9b0 100644 --- a/src/hacks/NavBot.cpp +++ b/src/hacks/NavBot.cpp @@ -1492,7 +1492,7 @@ static slots getBestSlot(slots active_slot, std::pair &ne if (HasWeapon(LOCAL_E, 56) || HasWeapon(LOCAL_E, 1005) || HasWeapon(LOCAL_E, 1092)) return primary; - if (nearest.second <= 200) + if (nearest.second <= 200.0f && !IsPlayerInvulnerable(nearest.first) && nearest.first->IsVisible()) return melee; else if (nearest.second <= 300 && nearest.first->m_iHealth() < 75) return secondary;