-
Автор темы
- #1
radius:
time:
C++:
if(Entity->GetClientClass()->ClassID == CInferno){
auto inferno = reinterpret_cast<C_Inferno*>(Entity);
Vector mins, maxs;
inferno->GetClientRenderable()->GetRenderBounds(mins, maxs);
Render->Draw3DFilledCircle(Entity->m_vecOrigin(), Vector(maxs - mins).Length2D() * 0.5, Color::Blue());;
}
C++:
static auto inferno_flame_lifetime = pCvar->FindVar("inferno_flame_lifetime");
Vector2D screen_origin;
screen_origin.x = (float)Box.left + (float)Box.weight / 2;
screen_origin.y = (float)Box.top + (float)Box.height;
float inferno_lifetime = inferno_flame_lifetime->GetFloat();
auto spawn_time = TICKS_TO_TIME(inferno->m_nFireEffectTickBegin());
auto factor = (spawn_time + inferno_lifetime) - g_pGlobalVars->curtime;
if (factor >= 0.f) {
static auto size = Vector2D(15, 5);
float lengh = (size.x / inferno_lifetime) * factor;
Render->RectFilld(screen_origin.x - size.x * 0.5f, screen_origin.y - size.y * 0.5f, size.x, size.y, Color(0, 0, 0, 255));
Render->RectFilld(screen_origin.x - size.x * 0.5f + 1, screen_origin.y - size.y * 0.5f + 1, lengh, size.y - 1, Color::White());
}
//Good Luck
C++:
int m_nFireEffectTickBegin()
{
static int m_nFireEffectTickBegin = Netvar->GetOffset("DT_Inferno", "m_nFireEffectTickBegin");
return *reinterpret_cast<int*>(uintptr_t(this) + m_nFireEffectTickBegin);
}
Последнее редактирование модератором: