Cleaned up code

This commit is contained in:
julianacat 2017-06-17 22:47:15 -05:00
parent 1cafa2b505
commit 890d33b390
4 changed files with 22 additions and 28 deletions

View File

@ -625,9 +625,6 @@ static const std::string list_tf2 = R"(
"log"
]
]
"deboog1"
"deboog2"
"deboog3"
)";
List& MainList() {

View File

@ -676,8 +676,29 @@ EAimbotLocalState ShouldAim() {
}
void PaintTraverse() {
if (!aimbot_debug) return;
if (!enabled) return;
//Fov ring to represent when a target will be shot
//Not perfect but does a good job of representing where its supposed to be
if (fov_draw) {
//It cant use fovs greater than 180, so we check for that
if ((int)fov < 180 && fov) {
//Dont show ring while player is dead
if (!LOCAL_E->m_bAlivePlayer) {
//Grab the screen resolution and save to some vars
int width, height;
g_IEngine->GetScreenSize(width, height);
//Grab the cvar for fov_desired and attach to another var
static ConVar *realFov = g_ICvar->FindVar("fov_desired");
//Some math to find radius of the fov circle
float radius = tanf(DEG2RAD((float)fov) / 2) / tanf(DEG2RAD((int)realFov)/ 2) * width;
//Draw a circle with our newfound circle
draw::DrawCircle( width / 2 ,height / 2, radius, 35, GUIColor());
}
}
}
if (!aimbot_debug) return;
AddSideString(format("AimbotState: ", static_cast<int>(local_state_last)));
}
@ -764,28 +785,6 @@ int BestHitbox(CachedEntity* target) {
}
return -1;
}
void Draw() {
//Fov ring to represent when a target will be shot
//Not perfect but does a good job of representing where its supposed to be
if (fov_draw) {
//It cant use fovs greater than 180, so we check for that
if ((int)fov < 180 && fov) {
//Dont show ring while player is dead
if (!LOCAL_E->m_bAlivePlayer) {
//Grab the screen resolution and save to some vars
int width, height;
g_IEngine->GetScreenSize(width, height);
//Grab the cvar for fov_desired and attach to another var
static ConVar *realFov = g_ICvar->FindVar("fov_desired");
//Some math to find radius of the fov circle
float radius = tanf(DEG2RAD((float)fov) / 2) / tanf(DEG2RAD((int)realFov)/ 2) * width;
//Draw a circle with our newfound circle
draw::DrawCircle( width / 2 ,height / 2, radius, 35, GUIColor());
}
}
}
}
}}}

View File

@ -92,7 +92,6 @@ bool VischeckPredictedEntity(CachedEntity* entity);
void CreateMove();
void PaintTraverse();
void Reset();
void Draw();
extern EAimbotState state;
extern int target_eid;

View File

@ -198,7 +198,6 @@ void PaintTraverse_hook(void* _this, unsigned int vp, bool fr, bool ar) {
}
{
SAFE_CALL(hacks::shared::aimbot::PaintTraverse());
SAFE_CALL(hacks::shared::aimbot::Draw());
}
}