спиздил из jsки на вт, перенёс на с++ и подогнал под ксгосимпл void Visuals::VelocityInfo() { auto last_log = 0; if (!g_LocalPlayer || !g_LocalPlayer->IsAlive()) return; if (!g_Options.velocity_info) return; int x, y; g_EngineClient->GetScreenSize(x, y); Vector vec = g_LocalPlayer->m_vecVelocity(); float velocity = sqrt(vec[0] * vec[0] + vec[1] * vec[1]); bool in_air = g_LocalPlayer->m_fFlags() & IN_JUMP /*|| g_LocalPlayer->m_fFlags() & IN_SPEED*/; Render::Get().RenderText(std::to_string(round(velocity)), ImVec2(x / 2, y / 2 + 450), 4, Color(245, 245, 220, 255)); Render::Get().RenderText("u/s", ImVec2(x / 2 + 1, y / 2 + 485), 2, Color(255, 255, 255, 255)); Render::Get().RenderLine(x / 2 - 100, y / 2 + 325, x / 2 - 100, y / 2 + 445, Color(100, 100, 100, 125)); Render::Get().RenderLine(x / 2 - 115, y / 2 + 430, x / 2 + 95, y / 2 + 430, Color(100, 100, 100, 125)); if (g_GlobalVars->curtime - last_log > g_GlobalVars->interval_per_tick) { last_log = g_GlobalVars->curtime; velocity_data.unshift([velocity, in_air]); } if (velocity_data.length > 40) velocity_data.pop(); for (auto i = 0; i < velocity_data.length - 1; i++) { auto cur = velocity_data[0]; auto next = velocity_data[i + 1][0]; auto landed = velocity_data[1] && !velocity_data[i + 1][1]; Render::Get().RenderLine(x / 2 + 90 - (i - 1) * 5, y / 2 + 430 - (clamp(cur, 0, 450) * 75 / 320), x / 2 + 90 - i * 5, y / 2 + 130 - (clamp(next, 0, 450) * 75 / 320), Color(200,200,200,255)); if (landed) Render::Get().RenderText(std::to_string(round(next)), ImVec2(x / 2 + 100 - (i + 1) * 5, y / 2 + 415 - (clamp(next, 0, 450) * 75 / 320)), 3, Color(245, 245, 220, 255)); } } [I][I]SS: