diff --git a/memory-external/hacks/hack.hpp b/memory-external/hacks/hack.hpp index b70f7d4..dd2b9fc 100644 --- a/memory-external/hacks/hack.hpp +++ b/memory-external/hacks/hack.hpp @@ -41,13 +41,6 @@ namespace hack { if (!player) continue; - - const int playerHealth = process->read(player + updater::offsets::dwPawnHealth); - const int playerArmor = process->read(player + updater::offsets::m_iPawnArmor); - if (playerHealth <= 0 || playerHealth > 100) - continue; - - /** * Skip rendering your own character and teammates * @@ -70,6 +63,10 @@ namespace hack { if (!pCSPlayerPawn) continue; + const int playerHealth = process->read(pCSPlayerPawn + updater::offsets::m_iHealth); + if (playerHealth <= 0 || playerHealth > 100) + continue; + if (config::team_esp && (pCSPlayerPawn == localPlayer)) continue;