From 171f07bf6ae19ebcfb28d077e0d0902b2c1bbb68 Mon Sep 17 00:00:00 2001 From: Shichiha <77842398+Shichiha@users.noreply.github.com> Date: Fri, 27 May 2022 15:41:30 +0900 Subject: [PATCH] tracer middle --- cheat-library/src/user/cheat/esp/ESP.cpp | 2 ++ cheat-library/src/user/cheat/esp/ESP.h | 1 + cheat-library/src/user/cheat/esp/ESPRender.cpp | 8 +++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cheat-library/src/user/cheat/esp/ESP.cpp b/cheat-library/src/user/cheat/esp/ESP.cpp index 23edc7c..c08d00a 100644 --- a/cheat-library/src/user/cheat/esp/ESP.cpp +++ b/cheat-library/src/user/cheat/esp/ESP.cpp @@ -29,6 +29,7 @@ namespace cheat::feature NF(f_ArrowRadius, "Arrow Radius", "ESP", 100.0f), NF(f_OutlineThickness, "Outline Thickness", "ESP", 1.0f), NF(f_TracerSize, "Tracer Size", "ESP", 1.0f), + NF(f_MiddleScreenTracer, "Middle Screen Tracer", "ESP", false), NF(f_DrawDistance, "Draw Distance", "ESP", false), NF(f_DrawName, "Draw Name", "ESP", false), @@ -71,6 +72,7 @@ namespace cheat::feature ConfigWidget(f_Fill); ConfigWidget(f_FillTransparency, 0.01f, 0.0f, 1.0f, "Transparency of filled part."); + ConfigWidget(f_MiddleScreenTracer, "Draw tracer from middle part of the screen."); if (f_DrawTracerMode.value() == DrawTracerMode::OffscreenArrows && BeginGroupPanel("Arrow tracer options", ImVec2(-1, 0), true)) diff --git a/cheat-library/src/user/cheat/esp/ESP.h b/cheat-library/src/user/cheat/esp/ESP.h index 979b435..e609e24 100644 --- a/cheat-library/src/user/cheat/esp/ESP.h +++ b/cheat-library/src/user/cheat/esp/ESP.h @@ -38,6 +38,7 @@ namespace cheat::feature config::Field f_ArrowRadius; config::Field f_OutlineThickness; config::Field f_TracerSize; + config::Field f_MiddleScreenTracer; config::Field f_FontSize; config::Field f_FontOutline; diff --git a/cheat-library/src/user/cheat/esp/ESPRender.cpp b/cheat-library/src/user/cheat/esp/ESPRender.cpp index 0e37786..e35314d 100644 --- a/cheat-library/src/user/cheat/esp/ESPRender.cpp +++ b/cheat-library/src/user/cheat/esp/ESPRender.cpp @@ -388,7 +388,13 @@ namespace cheat::feature::esp::render return; auto draw = ImGui::GetBackgroundDrawList(); - draw->AddLine(s_AvatarPosition, *screenPos, color); + ImRect screen_rect = { 0.0f, 0.0f, ImGui::GetIO().DisplaySize.x, ImGui::GetIO().DisplaySize.y }; + auto screen_center = screen_rect.GetCenter(); + auto& esp = ESP::GetInstance(); + if (!esp.f_MiddleScreenTracer) + draw->AddLine(s_AvatarPosition, *screenPos, color); + else + draw->AddLine(screen_center, *screenPos, color); } #define PI 3.14159265358979323846