-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
беамсы каму лень делать получились красивые
void bullettracers::draw_beam(bool local_tracer, const Vector& src, const Vector& end, Color color)
{
if (src == ZERO)
return;
BeamInfo_t beam_info;
beam_info.m_vecStart = src;
if (local_tracer)
beam_info.m_vecStart.z -= 5.0f;
beam_info.m_vecEnd = end;
beam_info.m_nType = TE_BEAMPOINTS;
beam_info.m_pszModelName = crypt_str("sprites/physbeam.vmt");
beam_info.m_nModelIndex = -1;
beam_info.m_flHaloScale = 0.0f;
beam_info.m_flLife = 5.0f;
beam_info.m_flWidth = 2.0f;
beam_info.m_flEndWidth = 2.0f;
beam_info.m_flFadeLength = 0.0f;
beam_info.m_flAmplitude = 1.0f;
beam_info.m_flBrightness = (float)color.a();
beam_info.m_flSpeed = 0.2f;
beam_info.m_nStartFrame = 0;
beam_info.m_flFrameRate = 0.0f;
beam_info.m_flRed = (float)color.r();
beam_info.m_flGreen = (float)color.g();
beam_info.m_flBlue = (float)color.b();
beam_info.m_nSegments = 2;
beam_info.m_bRenderable = true;
beam_info.m_nFlags = FBEAM_ONLYNOISEONCE | FBEAM_NOTILE | FBEAM_HALOBEAM;
auto beam = m_viewrenderbeams()->CreateBeamPoints(beam_info);
if (beam)
m_viewrenderbeams()->DrawBeam(beam);
}
ss-
void bullettracers::draw_beam(bool local_tracer, const Vector& src, const Vector& end, Color color)
{
if (src == ZERO)
return;
BeamInfo_t beam_info;
beam_info.m_vecStart = src;
if (local_tracer)
beam_info.m_vecStart.z -= 5.0f;
beam_info.m_vecEnd = end;
beam_info.m_nType = TE_BEAMPOINTS;
beam_info.m_pszModelName = crypt_str("sprites/physbeam.vmt");
beam_info.m_nModelIndex = -1;
beam_info.m_flHaloScale = 0.0f;
beam_info.m_flLife = 5.0f;
beam_info.m_flWidth = 2.0f;
beam_info.m_flEndWidth = 2.0f;
beam_info.m_flFadeLength = 0.0f;
beam_info.m_flAmplitude = 1.0f;
beam_info.m_flBrightness = (float)color.a();
beam_info.m_flSpeed = 0.2f;
beam_info.m_nStartFrame = 0;
beam_info.m_flFrameRate = 0.0f;
beam_info.m_flRed = (float)color.r();
beam_info.m_flGreen = (float)color.g();
beam_info.m_flBlue = (float)color.b();
beam_info.m_nSegments = 2;
beam_info.m_bRenderable = true;
beam_info.m_nFlags = FBEAM_ONLYNOISEONCE | FBEAM_NOTILE | FBEAM_HALOBEAM;
auto beam = m_viewrenderbeams()->CreateBeamPoints(beam_info);
if (beam)
m_viewrenderbeams()->DrawBeam(beam);
}
ss-
Последнее редактирование: