Гайд Auto Pick for lw (mem)

Начинающий
Статус
Оффлайн
Регистрация
12 Июн 2021
Сообщения
71
Реакции[?]
25
Поинты[?]
3K
Если что просто нечем было заняться, вот и решил хернёй пострадать :roflanBuldiga:

void Beam(Vector src, Vector end, Color color)
{

BeamInfo_t beamInfo;
beamInfo.m_nType = TE_BEAMPOINTS; //TE_BEAMPOINTS
beamInfo.m_vecStart = src;
beamInfo.m_vecEnd = end;
beamInfo.m_pszModelName = "sprites/bubble.vmt";
beamInfo.m_pszHaloName = "sprites/bubble.vmt";
beamInfo.m_flHaloScale = 1.5;
beamInfo.m_flWidth = 2.0f;
beamInfo.m_flEndWidth = 2.0f;
beamInfo.m_flFadeLength = 0.5f;
beamInfo.m_flAmplitude = 7;
beamInfo.m_flBrightness = 255.f;
beamInfo.m_flSpeed = 1.5f;
beamInfo.m_nStartFrame = 0.0;
beamInfo.m_flFrameRate = 0.0;
beamInfo.m_flRed = color.r();
beamInfo.m_flGreen = color.g();
beamInfo.m_flBlue = color.b();
beamInfo.m_nSegments = 7;
beamInfo.m_bRenderable = true;
beamInfo.m_flLife = 1.5;
beamInfo.m_nFlags = FBEAM_SHADEIN | FBEAM_ONLYNOISEONCE | FBEAM_NOTILE;
Beam_t* myBeam = m_viewrenderbeams()->CreateBeamPoints(beamInfo);
if (myBeam)
m_viewrenderbeams()->DrawBeam(myBeam);
}
void otheresp::automatic_peek_indicator()
{
auto weapon = g_ctx.local()->m_hActiveWeapon().Get();

if (!weapon)
return;

static auto position = ZERO;

if (!g_ctx.globals.start_position.IsZero())
position = g_ctx.globals.start_position;

if (position.IsZero())
return;

static auto alpha = 0.0f;

if (!weapon->is_non_aim() && key_binds::get().get_key_bind_state(18) || alpha)
{
if (!weapon->is_non_aim() && key_binds::get().get_key_bind_state(18))
alpha += 2.3f * m_globals()->m_frametime; //-V807
else
alpha -= 2.3f * m_globals()->m_frametime;
alpha = math::clamp(alpha, 0.0f, 1.0f);
//auto color_main = Color(0, 255, 0, (int)((alpha * 0)));
auto color_outline = Color(0, 255, 0, (int)(alpha * 255));
auto beam_circle = [](Vector position, float points, float radius, Color color, float rotate = 0, bool start_rotate = false) {
float step = start_rotate ? rotate : 1 * M_PI * 2.0f / points;
for (float a = 0; a < (M_PI * 2.0f); a += step)
{

const Vector start(radius * cosf(a) + position.x, radius * sinf(a) + position.y, position.z);
const Vector end(radius * cosf(a + step) + position.x, radius * sinf(a + step) + position.y, position.z);
Vector start2d, end2d;
Beam(start, end, color);
}
};
static float rotate = 0.f;
if (rotate <= 0.7f)
rotate += 0.01f;
else
rotate = 0.1;

beam_circle(position, 12, alpha * 20.f, color_outline, rotate, alpha == 1);

}
}
 
Сверху Снизу