-
Автор темы
- #1
Пожалуйста, авторизуйтесь для просмотра ссылки.
в player_esp.cpp
C++:
void playeresp::eva(player_t* e, const Box& box)
{
if (!g_cfg.player.type[type].eva)
return;
static auto model_index = m_modelinfo()->GetModelIndex(crypt_str("sprites/physbeam.vmt"));
if (g_ctx.globals.should_update_beam_index)
model_index = m_modelinfo()->GetModelIndex(crypt_str("sprites/physbeam.vmt"));
std::vector<BeamInfo_t> new_beams;
BeamInfo_t info;
switch (g_ctx.globals.kills)
{
case 0:
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 = 1.0f;
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;
info.m_flEndRadius = 30.0f;
info.m_bRenderable = true;
break;
case 1:
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 = 1.0f;
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 = 41.5f;
info.m_flEndRadius = 35.0f;
info.m_bRenderable = true;
break;
case 2:
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 = 6.0f;
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 = 46.5f;
info.m_flEndRadius = 40.0f;
info.m_bRenderable = true;
break;
case 3:
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 = 9.0f;
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 = 51.5f;
info.m_flEndRadius = 45.0f;
info.m_bRenderable = true;
break;
case 4:
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 = 11.0f;
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 = 56.5f;
info.m_flEndRadius = 50.0f;
info.m_bRenderable = true;
break;
case 5:
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 = 15.0f;
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 = 61.5f;
info.m_flEndRadius = 55.0f;
info.m_bRenderable = true;
break;
case 6:
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 = 20.0f;
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 = 66.5f;
info.m_flEndRadius = 60.0f;
info.m_bRenderable = true;
break;
case 7:
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 = 25.0f;
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 = 71.5f;
info.m_flEndRadius = 65.0f;
info.m_bRenderable = true;
break;
case 8:
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 = 30.0f;
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 = 76.5f;
info.m_flEndRadius = 70.0f;
info.m_bRenderable = true;
break;
default:
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 = 30.0f;
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 = 76.5f;
info.m_flEndRadius = 70.0f;
info.m_bRenderable = true;
break;
}
auto beam_draw = m_viewrenderbeams()->CreateBeamRingPoint(info);
if (beam_draw)
m_viewrenderbeams()->DrawBeam(beam_draw);
}
Код:
eva(e);
Код:
void eva(player_t* e);
Вообще хотел что бы внутри после первого фрага рисовался ещё один трасер,но т.к. я пастер, я не знаю как это сделать.
Так что вот вам +идея.
Если кто то знает как можно отрисовать ещё один трасер внутри первого круга, пишите ;)