-
Автор темы
- #1
кто знает как сделать график поменьше , а то слишком высоко поднимается
code:
C++:
int iVelocityGraphWidth = 400;
int iVelocityGraphHeight = 10;
int iYAdditive = 0;
int iXAdditive = 0;
float flVelocityGraphCompression = 1.0f;
float Graphtrickness = 1.0f;
void Visuals::PaintMovementData()
{
if (!g_LocalPlayer)
return;
static float flSpeed, flOldGroundSpeed, flLastGroundSpeed, flFrameTime;
static int iLastFlags;
const float flVelocity = std::round(g_LocalPlayer->m_vecVelocity().Length2D());
const int iFlags = g_LocalPlayer->m_fFlags();
int vecDisplaySizex, vecDisplaySizey;
g_EngineClient->GetScreenSize(vecDisplaySizex, vecDisplaySizey);
if (g_LocalPlayer->m_nMoveType() == MOVETYPE_NOCLIP) {}
else if (g_Options.bVelocityGraph && g_LocalPlayer->IsAlive() && vecMovementData.size() > 2)
{
for (int i = 0; i < vecMovementData.size() - 1; i++)
{
const MovementData_t currentData = vecMovementData[i];
const MovementData_t nextData = vecMovementData[i + 1];
const bool bLanded = !currentData.bOnGround && nextData.bOnGround;
const int iCurrentSpeed = std::clamp((int)currentData.flvelocity, 0, 450);
const int iNextSpeed = std::clamp((int)nextData.flvelocity, 0, 450);
const RECT linePos = {
vecDisplaySizey / 2 + g_Options.iXAdditive - ((g_Options.iVelocityGraphHeight) / 2) + ((g_Options.iVelocityGraphWidth) / 2) - 8 - ((signed int)i - 1) * 5 * 0.175f,
vecDisplaySizey / 2 + g_Options.iYAdditive - 50 - (iCurrentSpeed / g_Options.flVelocityGraphCompression) /2,
vecDisplaySizey / 2 + g_Options.iXAdditive - ((g_Options.iVelocityGraphHeight) / 2) + ((g_Options.iVelocityGraphWidth) / 2) - 8 - (signed int)i * 5 * 0.175f,
vecDisplaySizey / 2 + g_Options.iYAdditive - 50 - (iNextSpeed / g_Options.flVelocityGraphCompression) /2
};
render::Get().RenderLine(linePos.left, linePos.top, linePos.right, linePos.bottom, g_Options.colorgraph, g_Options.Graphtrickness);
}
};
}
Последнее редактирование: