void Indicators() {
if (Globals::LocalPlayer) {
if (Globals::LocalPlayer->IsAlive()) {
if (!Globals::LocalPlayer->AnimState())
return;
int screenSizeX, screenCenterX;
int screenSizeY, screenCenterY;
g_pEngine->GetScreenSize(screenSizeX, screenSizeY);
auto chocked_commands = *(int*)(uintptr_t(g_pClientState) + 0x4D28);
RECT FakeSize = g_pSurface->GetTextSizeRect(Globals::CourierNew, "Fake");
RECT CHOKESIZE = g_pSurface->GetTextSizeRect(Globals::CourierNew, "Choke");
RECT ManualSize = g_pSurface->GetTextSizeRect(Globals::CourierNew, "Right");
float DesyncWidth;
if (Globals::DesyncEnabledSpecialChecks) {
DesyncWidth = (((Globals::LocalPlayer->DesyncValue() * (FakeSize.right / -58.f))));
}
else {
DesyncWidth = (((0 * (FakeSize.right / -58.f))));
}
float ChokedWidth;
ChokedWidth = (((chocked_commands * (CHOKESIZE.right / 14.f))));
bool Show_Manual = c_config::get().yaw_standing == 4 || c_config::get().yaw_moving == 4 || c_config::get().yaw_air == 4;
screenCenterX = screenSizeX - 90;
screenCenterY = 40;
int FAKE_G = Globals::LocalPlayer->DesyncValue() / -58.f * 255.f;
int FAKE_R = 255.f - FAKE_G;
int FAKE_B = 0.f;
int CHOKE_G = chocked_commands / 14.f * 255.f;
int CHOKE_R = 255.f - CHOKE_G;
int CHOKE_B = 0.f;
static bool Show_Fake = true;
static bool Show_Choke = true;
int IndicatorPos = 0;
if (Show_Manual) {
Color theme = Color(c_config::get().menu_color_r, c_config::get().menu_color_g, c_config::get().menu_color_b);
std::array< vec2_t, 3 >right_facing{ vec2_t(((screenSizeX / 2) + 32) - 8, screenSizeY / 2 - 8), vec2_t(((screenSizeX / 2) + 32) + 8, screenSizeY / 2), vec2_t(((screenSizeX / 2) + 32) - 8, screenSizeY / 2 + 8) };
std::array< vec2_t, 3 >left_facing{ vec2_t(((screenSizeX / 2) - 31) + 8, screenSizeY / 2 + 8), vec2_t(((screenSizeX / 2) - 31) - 8, screenSizeY / 2), vec2_t(((screenSizeX / 2) - 31) + 8, screenSizeY / 2 - 8) };
g_pSurface->draw_filled_triangle(left_facing, Globals::Manual_Side ? theme : Color(125, 125, 125, 185));
g_pSurface->PolygonOutline(3, left_facing, Color(0, 0, 0, 255));
g_pSurface->draw_filled_triangle(right_facing, Globals::Manual_Side ? Color(125, 125, 125, 185) : theme);
g_pSurface->PolygonOutline(3, left_facing, Color(0, 0, 0, 255));
}
if (Show_Choke) {
g_pSurface->DrawT(screenCenterX - 5 - IndicatorPos + (CHOKESIZE.right / 2), screenCenterY - 14, Color(255, 255, 255, 255), Globals::CourierNew, true, "Choke");
g_pSurface->FilledRect(screenCenterX - 5 - IndicatorPos, screenCenterY, CHOKESIZE.right, 4, Color(0, 0, 0, 185));
g_pSurface->FilledRect(screenCenterX - 5 - IndicatorPos, screenCenterY, ChokedWidth, 4, Color(CHOKE_R, CHOKE_G, CHOKE_B, 255));
g_pSurface->OutlinedRect(screenCenterX - 5 - IndicatorPos, screenCenterY, CHOKESIZE.right, 4, Color(0, 0, 0, 255));;
IndicatorPos += CHOKESIZE.right;
}
if (Show_Fake) {
g_pSurface->DrawT(screenCenterX - 5 - IndicatorPos + (FakeSize.right / 2), screenCenterY - 14, Color(255, 255, 255, 255), Globals::CourierNew, true, "Fake");
g_pSurface->FilledRect(screenCenterX - 5 - IndicatorPos, screenCenterY, FakeSize.right, 4, Color(0, 0, 0, 185));
g_pSurface->FilledRect(screenCenterX - 5 - IndicatorPos, screenCenterY, DesyncWidth, 4, Color(FAKE_R, FAKE_G, FAKE_B, 255));
g_pSurface->OutlinedRect(screenCenterX - 5 - IndicatorPos, screenCenterY, FakeSize.right, 4, Color(0, 0, 0, 255));
IndicatorPos += FakeSize.right;
}
}
}
}