-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathf_visuals.cpp
More file actions
36 lines (28 loc) · 922 Bytes
/
f_visuals.cpp
File metadata and controls
36 lines (28 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "f_helper.h"
#include "f_visuals.h"
void FVisuals::Run(int ClientID, float Angle, vec2 Position)
{
if(!fHelper->m_pConfig->espCfg.enabled)
return;
Graphics()->TextureClear();
DrawFov();
}
// Fov
void FVisuals::DrawFov()
{
if(!fHelper->m_pConfig->espCfg.drawFov)
return;
DrawFovLine(fHelper->m_pConfig->aimbotCfg.fov * 0.01f);
DrawFovLine(fHelper->m_pConfig->aimbotCfg.fov * -0.01f);
}
void FVisuals::DrawFovLine(float offset)
{
const float Angle = angle(Controls()->m_aMousePos[g_Config.m_ClDummy]) + offset;
const vec2 ExDirection = normalize(direction(Angle));
const vec2 InitPos = m_pClient->m_LocalCharacterPos;
vec2 FinishPos = InitPos + ExDirection * (Tuning()->m_HookLength);
int teleNr = 0;
Collision()->IntersectLineTeleHook(InitPos, FinishPos, &FinishPos, nullptr, &teleNr);
const ColorRGBA HookCollColor(0.0f, 0.0f, 0.0f, 0.5f);
DrawLine(InitPos, FinishPos, HookCollColor);
}