Skip to content

Commit

Permalink
feat: safety changes, added aim through wall toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
stdNullPtr committed Dec 21, 2024
1 parent c5d259e commit 9bb0ff8
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 41 deletions.
3 changes: 3 additions & 0 deletions um-client/src/global.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ namespace g
static bool glow_hack{ false };
static bool no_flash_hack{ false };
static bool esp_hack{ false };

static bool aim_hack{ false };
static bool aim_assist{ false };
static bool aim_through_walls{ false };

inline void reset_toggles()
{
Expand All @@ -47,6 +49,7 @@ namespace g
esp_hack = false;
aim_hack = false;
aim_assist = false;
aim_through_walls = false;
}
}
}
13 changes: 10 additions & 3 deletions um-client/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,12 @@ int main()
std::wcout << '\n';
#endif

if (is_paused || (!commons::window::isWindowInFocus(g::cs2_window_name) && !commons::window::isWindowInFocus(cheat::imgui::g::overlay_window_name)))
const bool is_window_in_focus{ (commons::window::isWindowInFocus(g::cs2_window_name) || commons::window::isWindowInFocus(cheat::imgui::g::overlay_window_name)) };
if (is_paused || !is_window_in_focus)
{
std::wcout << XORW(L"[F1] Paused...\n");
draw_list.clear();
aim_target = std::nullopt;
sleep_for(50ms);
continue;
}
Expand Down Expand Up @@ -192,9 +194,14 @@ int main()

const auto head_bone_pos_world{ entity->get_head_bone_pos(driver) };
const auto head_bone_pos_screen{ render::utils::world_to_screen(view_matrix, head_bone_pos_world) };
if (entity_spotted_by_local_player)

const auto aim_position{ head_bone_pos_screen };
if (g::toggles::aim_through_walls)
{
aim_targets.emplace_back(aim_position);
}
else if (entity_spotted_by_local_player)
{
const auto aim_position{ head_bone_pos_screen };
aim_targets.emplace_back(aim_position);
}

Expand Down
67 changes: 29 additions & 38 deletions um-client/src/render/Render.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,31 +71,16 @@ namespace render
}

if (GetAsyncKeyState(VK_F2) & 0x1)
{
radar_hack = !radar_hack;
}

if (GetAsyncKeyState(VK_F3) & 0x1)
{
glow_hack = !glow_hack;
}

if (GetAsyncKeyState(VK_F4) & 0x1)
{
no_flash_hack = !no_flash_hack;
}

if (GetAsyncKeyState(VK_F5) & 0x1)
{
esp_hack = !esp_hack;
}

if (GetAsyncKeyState(VK_F6) & 0x1)
if (GetAsyncKeyState(VK_F3) & 0x1)
{
aim_hack = !aim_hack;
}

if (GetAsyncKeyState(VK_F7) & 0x1 && aim_hack)
if (GetAsyncKeyState(VK_F4) & 0x1 && aim_hack)
{
aim_assist = !aim_assist;
}
Expand Down Expand Up @@ -151,31 +136,13 @@ namespace render
ImGui::BeginDisabled();
}

ImGui::Checkbox(XOR("[F2] Radar (Unsafe) "), &radar_hack);
ImGui::SameLine();
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.5f, 0.0f, 1.0f));
ImGui::TextUnformatted(ICON_FA_EXCLAMATION_TRIANGLE);
ImGui::PopStyleColor();

ImGui::Checkbox(XOR("[F3] Glow (Unsafe) "), &glow_hack);
ImGui::SameLine();
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.5f, 0.0f, 1.0f));
ImGui::TextUnformatted(ICON_FA_EXCLAMATION_TRIANGLE);
ImGui::PopStyleColor();

ImGui::Checkbox(XOR("[F4] No flash (Unsafe)"), &no_flash_hack);
ImGui::SameLine();
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.5f, 0.0f, 1.0f));
ImGui::TextUnformatted(ICON_FA_EXCLAMATION_TRIANGLE);
ImGui::PopStyleColor();

ImGui::Checkbox(XOR("[F5] ESP "), &esp_hack);
ImGui::Checkbox(XOR("[F2] ESP "), &esp_hack);
ImGui::SameLine();
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.0f, 1.0f, 0.0f, 1.0f));
ImGui::TextUnformatted(ICON_FA_EYE);
ImGui::PopStyleColor();

ImGui::Checkbox(XOR("[F6] AIM (hold middle mouse)"), &aim_hack);
ImGui::Checkbox(XOR("[F3] AIM (hold middle mouse)"), &aim_hack);
ImGui::SameLine();
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 1.0f, 0.0f, 1.0f));
ImGui::TextUnformatted(ICON_FA_CROSSHAIRS);
Expand All @@ -185,7 +152,13 @@ namespace render
{
ImGui::BeginDisabled();
}
ImGui::Checkbox(XOR("[F7] AIM assist (just shoot) "), &aim_assist);
ImGui::Checkbox(XOR("[F4] AIM assist (just shoot) "), &aim_assist);
ImGui::SameLine();
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 1.0f, 0.0f, 1.0f));
ImGui::TextUnformatted(ICON_FA_CROSSHAIRS);
ImGui::PopStyleColor();

ImGui::Checkbox(XOR("Through walls "), &aim_through_walls);
ImGui::SameLine();
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 1.0f, 0.0f, 1.0f));
ImGui::TextUnformatted(ICON_FA_CROSSHAIRS);
Expand All @@ -195,6 +168,24 @@ namespace render
ImGui::EndDisabled();
}

ImGui::Checkbox(XOR("Radar (Unsafe) "), &radar_hack);
ImGui::SameLine();
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.5f, 0.0f, 1.0f));
ImGui::TextUnformatted(ICON_FA_EXCLAMATION_TRIANGLE);
ImGui::PopStyleColor();

ImGui::Checkbox(XOR("Glow (Unsafe) "), &glow_hack);
ImGui::SameLine();
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.5f, 0.0f, 1.0f));
ImGui::TextUnformatted(ICON_FA_EXCLAMATION_TRIANGLE);
ImGui::PopStyleColor();

ImGui::Checkbox(XOR("No flash (Unsafe)"), &no_flash_hack);
ImGui::SameLine();
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.5f, 0.0f, 1.0f));
ImGui::TextUnformatted(ICON_FA_EXCLAMATION_TRIANGLE);
ImGui::PopStyleColor();

if (is_paused)
{
ImGui::EndDisabled();
Expand Down

0 comments on commit 9bb0ff8

Please sign in to comment.