-
Автор темы
- #1
кто знает как это пофиксить , если что спастил из clockwise
Код:
void BunnyHop::foot_trace(CUserCmd* cmd) {
if (!g_Options.foot) return;
if (!g_LocalPlayer) return;
auto player = g_LocalPlayer;
if (player->m_nMoveType() == MOVETYPE_LADDER || player->m_nMoveType() == MOVETYPE_NOCLIP)
return;
Vector Origin_old(0, 0, 0);
auto LocalOrigin = player->abs_origin();
int LocalVelocity = player->m_vecVelocity().Length2D();
if (!(player->m_fFlags() & FL_ONGROUND) && Tick == 0) {
auto col = Color(179, 255, 135, 255);
if (!JumpFailed) {
col = Color(255, 0, 0, 255);
}
BeamInfo_t beam_info;
beam_info.m_nType = TE_BEAMPOINTS;
beam_info.m_pszModelName = "sprites/purplelaser1.vmt";
beam_info.m_nModelIndex = -1;
beam_info.m_flHaloScale = 0.0;
beam_info.m_flLife = 2.f;
beam_info.m_flWidth = 5;
beam_info.m_flEndWidth = 5;
beam_info.m_flFadeLength = 0.0;
beam_info.m_flAmplitude = 2.0;
beam_info.m_flSpeed = 0.5;
beam_info.m_flBrightness = 255.f;
beam_info.m_nStartFrame = 0.;
beam_info.m_flFrameRate = 0.;
beam_info.m_flRed = col.r();
beam_info.m_flGreen = col.g();
beam_info.m_flBlue = col.b();
beam_info.m_nSegments = 2;
beam_info.m_bRenderable = true;
beam_info.m_nFlags = 0;
beam_info.m_vecStart = Origin_old;
beam_info.m_vecEnd = LocalOrigin;
auto beam = g_RenderBeams->CreateBeamPoints(beam_info);
if (beam)
g_RenderBeams->DrawBeam(beam);
Velocity_old = LocalVelocity;
}
if (Tick == 0) {
Origin_old = LocalOrigin;
Tick = IgonreTicks + 1;
}
Tick = Tick - 1;
if (player->m_fFlags() & (1 << 0)) {
Velocity_old = 0;
JumpFailed = false;
}
}