diff --git a/memory-external/hacks/hack.hpp b/memory-external/hacks/hack.hpp index 3071531..2567fc2 100644 --- a/memory-external/hacks/hack.hpp +++ b/memory-external/hacks/hack.hpp @@ -17,9 +17,18 @@ namespace hack { const int localTeam = process->read(localPlayer + updater::offsets::m_iTeamNum); const view_matrix_t view_matrix = process->read(base_client.base + updater::offsets::dwViewMatrix); - const Vector3 localOrigin = process->read(localPlayer + updater::offsets::m_vecOrigin); const uintptr_t entity_list = process->read(base_client.base + updater::offsets::dwEntityList); + const std::uint32_t localPlayerPawn = process->read(localPlayer + updater::offsets::dwPlayerPawn); + if (!localPlayerPawn) + return; + const uintptr_t localList_entry2 = process->read(entity_list + 0x8 * ((localPlayerPawn & 0x7FFF) >> 9) + 16); + const uintptr_t localpCSPlayerPawn = process->read(localList_entry2 + 120 * (localPlayerPawn & 0x1FF)); + if (!localpCSPlayerPawn) + return; + + const Vector3 localOrigin = process->read(localpCSPlayerPawn + updater::offsets::m_vecOrigin); + int playerIndex = 0; uintptr_t list_entry; @@ -156,7 +165,7 @@ namespace hack { /** * I know is not the best way but a simple way to not saturate the screen with a ton of information */ - if (roundedDistance < config::flag_render_distance) + if (roundedDistance > config::flag_render_distance) continue; render::RenderText(