void DrawKzWindow()
{
if (g_EngineClient->IsInGame() && g_LocalPlayer)
{
if (!g_LocalPlayer->IsAlive()) return;
ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0.0f, 0.0f, 0.0f, 0.25f));
ImGui::SetNextWindowPos(ImVec2(((ImGui::GetIO().DisplaySize.x / 2) - ImGui::GetIO().DisplaySize.x / 20 * 1), (ImGui::GetIO().DisplaySize.y / 4) * 3), ImGuiCond_Once);
ImGui::Begin("kz-show-kz", NULL, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize);
{
auto netchannel = g_EngineClient->GetNetChannelInfo();
if (netchannel)
{
int incoming = (int)(netchannel->GetLatency(FLOW_INCOMING) * 1000);
int outgoing = (int)(netchannel->GetLatency(FLOW_OUTGOING) * 1000);
static float fMaxPspeed = 0.f;
int choked = g_EngineClient->GetNetChannel()->m_nChokedPackets;
if (g_LocalPlayer->m_vecVelocity().Length2D() == 0)
fMaxPspeed = 0.0;
if (g_LocalPlayer->m_vecVelocity().Length2D() > fMaxPspeed)
fMaxPspeed = g_LocalPlayer->m_vecVelocity().Length2D();
ImGui::Text("Speed: %.3f", g_LocalPlayer->m_vecVelocity().Length2D());
ImGui::Text("SpeedMax: %.3f", fMaxPspeed);
}
ImGui::End();
}
ImGui::PopStyleColor();
}
}