General Improvements

**Head Tracker**
- Makes head tracker distance based
- Makes circle an outline of a circle rather than filled
- Adjusted circle to be more oval shape to fit character heads
- Added toggle feature to head tracker as requested by many

**Handle Hijack**
- Changed permissions for hijacked handle from all access to permissions of svchost.exe, which still allows read and write memory, but removes the all access permissions, looking more "legit" to VAC

**Offsets**
- Update offsets for game build 13968
This commit is contained in:
ifBars
2023-11-08 23:28:38 -07:00
parent dca17c6f85
commit 95b3b48178
7 changed files with 38 additions and 37 deletions
+17 -13
View File
@@ -128,9 +128,7 @@ namespace hack {
if (origin.x == localOrigin.x && origin.y == localOrigin.y && origin.z == localOrigin.z)
continue;
const uintptr_t gamescene = process->read<uint64_t>(pCSPlayerPawn + 0x310);
const uintptr_t bonearray = process->read<uint64_t>(gamescene + 0x160 + 0x80);
const Vector3 headPos = process->read<Vector3>(bonearray + 6 * 32);
if (config::render_distance != -1 && (localOrigin - origin).length2d() > config::render_distance)
continue;
@@ -140,24 +138,30 @@ namespace hack {
const Vector3 screenPos = origin.world_to_screen(view_matrix);
const Vector3 screenHead = head.world_to_screen(view_matrix);
const Vector3 screenHeadPos = headPos.world_to_screen(view_matrix);
if (screenPos.z >= 0.01f) {
const float height = screenPos.y - screenHead.y;
const float width = height / 2.4f;
const float head_height = (screenHeadPos.y - screenHeadPos.y) / 8;
const float head_width = (head_height / 2.4f) / 4;
float distance = localOrigin.calculate_distance(origin);
int roundedDistance = std::round(distance / 10.f);
render::DrawCircle(
g::hdcBuffer,
screenHeadPos.x,
screenHeadPos.y,
5,
config::esp_box_color_enemy
);
if (config::show_head_tracker)
{
const uintptr_t gamescene = process->read<uint64_t>(pCSPlayerPawn + 0x310);
const uintptr_t bonearray = process->read<uint64_t>(gamescene + 0x160 + 0x80);
const Vector3 headPos = process->read<Vector3>(bonearray + 6 * 32);
const Vector3 screenHeadPos = headPos.world_to_screen(view_matrix);
render::DrawCircle(
g::hdcBuffer,
screenHeadPos.x,
screenHeadPos.y,
width / 5,
config::esp_box_color_enemy
);
}
render::DrawBorderBox(
g::hdcBuffer,