Fixed merge issue. im getting dumber day to day :c

This commit is contained in:
IMXNOOBX
2023-11-09 18:52:05 +01:00
parent 1cb2c4d1a6
commit 8c97730594
2 changed files with 12 additions and 31 deletions
+6 -28
View File
@@ -51,25 +51,6 @@ namespace hack {
for (auto player = g_game.players.begin(); player < g_game.players.end(); player++) { 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 screenPos = g_game.world_to_screen(&player->origin);
const Vector3 screenHead = g_game.world_to_screen(&player->head); 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<Vector3>(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) { if (screenPos.z >= 0.01f) {
const float height = screenPos.y - screenHead.y; const float height = screenPos.y - screenHead.y;
@@ -78,18 +59,16 @@ namespace hack {
float distance = g_game.localOrigin.calculate_distance(player->origin); float distance = g_game.localOrigin.calculate_distance(player->origin);
int roundedDistance = std::round(distance / 10.f); int roundedDistance = std::round(distance / 10.f);
if (config::show_head_tracker) if (config::show_head_tracker) {
{ const Vector3 screenHeadPos = g_game.world_to_screen(&player->skull);
const uintptr_t gamescene = process->read<uint64_t>(pCSPlayerPawn + 0x310); const float head_height = (screenHeadPos.y - screenHeadPos.y) / 8;
const uintptr_t bonearray = process->read<uint64_t>(gamescene + 0x160 + 0x80); const float head_width = (head_height / 2.4f) / 4;
const Vector3 headPos = process->read<Vector3>(bonearray + 6 * 32);
const Vector3 screenHeadPos = headPos.world_to_screen(view_matrix);
render::DrawCircle( render::DrawCircle(
g::hdcBuffer, g::hdcBuffer,
screenHeadPos.x, screenHeadPos.x,
screenHeadPos.y, screenHeadPos.y,
width / 5, 5,
config::esp_box_color_enemy config::esp_box_color_enemy
); );
} }
@@ -194,7 +173,7 @@ namespace hack {
RGB(0, 125, 0), RGB(0, 125, 0),
10 10
); );
if (player->flashAlpha > 100) if (player->flashAlpha > 100)
{ {
render::RenderText( render::RenderText(
@@ -226,4 +205,3 @@ namespace hack {
} }
} }
+6 -3
View File
@@ -115,9 +115,12 @@ void CGame::loop() {
if (config::render_distance != -1 && (localOrigin - player.origin).length2d() > config::render_distance) continue; if (config::render_distance != -1 && (localOrigin - player.origin).length2d() > config::render_distance) continue;
if (player.origin.x == 0 && player.origin.y == 0) continue; if (player.origin.x == 0 && player.origin.y == 0) continue;
const uintptr_t gamescene = process->read<uint64_t>(player.pCSPlayerPawn + 0x310); if (config::show_head_tracker) {
const uintptr_t bonearray = process->read<uint64_t>(gamescene + 0x160 + 0x80); const uintptr_t gamescene = process->read<uint64_t>(player.pCSPlayerPawn + 0x310);
player.skull = process->read<Vector3>(bonearray + 6 * 32); const uintptr_t bonearray = process->read<uint64_t>(gamescene + 0x160 + 0x80);
player.skull = process->read<Vector3>(bonearray + 6 * 32);
}
if (config::show_extra_flags) { if (config::show_extra_flags) {
/* /*