class BulletTracer
{
public:
BulletTracer(Utilities::vec3 start, Utilities::vec3 hit, __int32 ticks, ImVec4 color, ImVec4 hitmarker_color, ImVec4 hitmarker_bg)
{
this->start = start;
this->hit = hit;
this->ticks = ticks;
this->color = color;
this->hitmarker_color = hitmarker_color;
this->hitmarker_bg = hitmarker_bg;
}
Utilities::vec3 start, hit;
__int32 ticks;
ImVec4 color;
ImVec4 hitmarker_color, hitmarker_bg;
};
decltype(&Hooks:

oHitNotify) Hooks:

oHitNotify_callback;
void Hooks:

oHitNotify(__int64* hit_entity, HitInfo* hit_info)
{
if (Utilities::is_valid_pointer(hit_entity))
Variables::bullet_tracer.push_back(BulletTracer(hi t_info->start, hit_info->end, GetTickCount64(), ImVec4{ 1.f, 0.2f, 0.1f, 1.f }, ImVec4{ 1.f, 1.f, 1.f, 1.f }, ImVec4{ 0.f, 0.f, 0.f, 1.f }));
DoHitNotify_callback(hit_entity, hit_info);
}
void Visuals::hitmarkers(void)
{
for (auto i = 0; i < Variables::bullet_tracer.size() && !Variables::bullet_tracer.empty(); i++)
{
auto tracer = Variables::bullet_tracer;
auto begin = tracer.begin();
auto current_tracer = tracer.at(i);
if (begin != tracer.end())
{
auto ticks = (GetTickCount64() - current_tracer.ticks);
current_tracer.hitmarker_color.w = 1 - ((float)ticks / 3000.f);
current_tracer.hitmarker_bg.w = 1 - ((float)ticks / 3000.f);
Utilities::vec3 start{ 0.f, 0.f, 0.f };
Utilities::vec3 hit{ 0.f, 0.f, 0.f };
Functions::world_to_screen(current_tracer.hit, hit);
Functions::world_to_screen(current_tracer.start, start);
Renderer.text(XOR("X"), hit.x, hit.y, current_tracer.hitmarker_color, current_tracer.hitmarker_bg, true);
if (current_tracer.hitmarker_color.w <= 0.f || current_tracer.hitmarker_bg.w <= 0.f)
begin = tracer.erase(begin + i);
else
begin++;
}
}
}