Update hack.hpp
- Add C4 ESP
This commit is contained in:
@@ -38,6 +38,33 @@ namespace hack {
|
||||
* (This could have been done by getting a entity list count from the engine, but I'm too lazy to do that)
|
||||
**/
|
||||
while (true) {
|
||||
bool c4IsPlanted = process->read<bool>(base_client.base + updater::offsets::dwPlantedC4 - 0x8);
|
||||
if (c4IsPlanted)
|
||||
{
|
||||
const uintptr_t planted_c4 = process->read<uintptr_t>(process->read<uintptr_t>(base_client.base + updater::offsets::dwPlantedC4));
|
||||
|
||||
const uintptr_t c4Node = process->read<uintptr_t>(planted_c4 + updater::offsets::m_pGameSceneNode);
|
||||
|
||||
const Vector3 c4Origin = process->read<Vector3>(c4Node + updater::offsets::m_vecAbsOrigin);
|
||||
|
||||
const Vector3 c4ScreenPos = c4Origin.world_to_screen(view_matrix);
|
||||
|
||||
float distance = localOrigin.calculate_distance(c4Origin);
|
||||
float roundedDistance = std::round(distance / 500.f);
|
||||
|
||||
float height = 10 - roundedDistance;
|
||||
float width = height * 1.2f;
|
||||
|
||||
render::DrawBorderBox(
|
||||
g::hdcBuffer,
|
||||
c4ScreenPos.x - (width / 2),
|
||||
c4ScreenPos.y - (height / 2),
|
||||
width,
|
||||
height,
|
||||
RGB(0, 185, 255)
|
||||
);
|
||||
}
|
||||
|
||||
playerIndex++;
|
||||
list_entry = process->read<uintptr_t>(entity_list + (8 * (playerIndex & 0x7FFF) >> 9) + 16);
|
||||
if (!list_entry)
|
||||
|
||||
Reference in New Issue
Block a user