From 8c97730594d6b57027a94d933124c7d9f3193373 Mon Sep 17 00:00:00 2001 From: IMXNOOBX Date: Thu, 9 Nov 2023 18:52:05 +0100 Subject: [PATCH] Fixed merge issue. im getting dumber day to day :c --- memory-external/hacks/hack.hpp | 34 ++++++-------------------------- memory-external/hacks/reader.cpp | 9 ++++++--- 2 files changed, 12 insertions(+), 31 deletions(-) diff --git a/memory-external/hacks/hack.hpp b/memory-external/hacks/hack.hpp index 03a5661..9d10dd0 100644 --- a/memory-external/hacks/hack.hpp +++ b/memory-external/hacks/hack.hpp @@ -51,25 +51,6 @@ namespace hack { for (auto player = g_game.players.begin(); player < g_game.players.end(); player++) { const Vector3 screenPos = g_game.world_to_screen(&player->origin); const Vector3 screenHead = g_game.world_to_screen(&player->head); - const Vector3 screenHeadPos = g_game.world_to_screen(&player->skull); - - const Vector3 origin = process->read(pCSPlayerPawn + updater::offsets::m_vecOrigin); - const Vector3 head = { origin.x, origin.y, origin.z + 75.f }; - - if (origin.x == localOrigin.x && origin.y == localOrigin.y && origin.z == localOrigin.z) - continue; - - - - if (config::render_distance != -1 && (localOrigin - origin).length2d() > config::render_distance) - continue; - - if (origin.x == 0 && origin.y == 0) - continue; - - const Vector3 screenPos = origin.world_to_screen(view_matrix); - const Vector3 screenHead = head.world_to_screen(view_matrix); - if (screenPos.z >= 0.01f) { const float height = screenPos.y - screenHead.y; @@ -78,18 +59,16 @@ namespace hack { float distance = g_game.localOrigin.calculate_distance(player->origin); int roundedDistance = std::round(distance / 10.f); - if (config::show_head_tracker) - { - const uintptr_t gamescene = process->read(pCSPlayerPawn + 0x310); - const uintptr_t bonearray = process->read(gamescene + 0x160 + 0x80); - const Vector3 headPos = process->read(bonearray + 6 * 32); - const Vector3 screenHeadPos = headPos.world_to_screen(view_matrix); + if (config::show_head_tracker) { + const Vector3 screenHeadPos = g_game.world_to_screen(&player->skull); + const float head_height = (screenHeadPos.y - screenHeadPos.y) / 8; + const float head_width = (head_height / 2.4f) / 4; render::DrawCircle( g::hdcBuffer, screenHeadPos.x, screenHeadPos.y, - width / 5, + 5, config::esp_box_color_enemy ); } @@ -194,7 +173,7 @@ namespace hack { RGB(0, 125, 0), 10 ); - + if (player->flashAlpha > 100) { render::RenderText( @@ -226,4 +205,3 @@ namespace hack { } } - diff --git a/memory-external/hacks/reader.cpp b/memory-external/hacks/reader.cpp index 20154d2..f7dab94 100644 --- a/memory-external/hacks/reader.cpp +++ b/memory-external/hacks/reader.cpp @@ -115,9 +115,12 @@ void CGame::loop() { if (config::render_distance != -1 && (localOrigin - player.origin).length2d() > config::render_distance) continue; if (player.origin.x == 0 && player.origin.y == 0) continue; - const uintptr_t gamescene = process->read(player.pCSPlayerPawn + 0x310); - const uintptr_t bonearray = process->read(gamescene + 0x160 + 0x80); - player.skull = process->read(bonearray + 6 * 32); + if (config::show_head_tracker) { + const uintptr_t gamescene = process->read(player.pCSPlayerPawn + 0x310); + const uintptr_t bonearray = process->read(gamescene + 0x160 + 0x80); + player.skull = process->read(bonearray + 6 * 32); + } + if (config::show_extra_flags) { /*