Исходник Нимб над головой

Эксперт
Статус
Оффлайн
Регистрация
30 Дек 2019
Сообщения
1,970
Реакции[?]
958
Поинты[?]
19K
Просто сделал код с этой темы: https://yougame.biz/threads/242748/#post-2517801, более красивым

Код:
void playeresp::eva(player_t* e, const Box& box)
{
        BeamInfo_t info{};
        info.m_nType = TE_BEAMRINGPOINT;
        info.m_pszModelName = crypt_str("sprites/physbeam.vmt");
        info.m_nModelIndex = model_index;
        info.m_nHaloIndex = 1;
        info.m_flHaloScale = 3.0f;
        info.m_flLife = 0.05f;
        info.m_flWidth = 3.5f;
        info.m_flFadeLength = 0.0f;
        info.m_flAmplitude = g_ctx.globals.kills == 0 ? 1.0f : 3,75 * g_ctx.globals.kills;
        info.m_flRed = (float)g_cfg.player.type[type].eva_color.r();
        info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g();
        info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b();
        info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a();
        info.m_flSpeed = 0.0f;
        info.m_nStartFrame = 0.0f;
        info.m_flFrameRate = 0.0f;
        info.m_nSegments = -1;
        info.m_nFlags = FBEAM_FADEOUT;
        info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f);
        info.m_flStartRadius = 36.5f + 8.4f * g_ctx.globals.kills;
        info.m_flEndRadius = 30.0f + 8.4f * g_ctx.globals.kills;
        info.m_bRenderable = true;
        auto beam_draw = m_viewrenderbeams()->CreateBeamRingPoint(info);

        if (beam_draw)
            m_viewrenderbeams()->DrawBeam(beam_draw);

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