Before mov
This commit is contained in:
parent
d0e6715182
commit
da6c50ce51
@ -7,13 +7,14 @@ OPTIMIZE
|
||||
|
||||
proper player struct
|
||||
optimize
|
||||
buildings aim
|
||||
no autoshoot consumable
|
||||
no autoshoot disg
|
||||
amby body
|
||||
|
||||
AutoHB amby
|
||||
|
||||
Bot Pathfinding
|
||||
|
||||
CRIT BODYSHOT
|
||||
NoZoom FIX !!!
|
||||
|
||||
|
@ -13,6 +13,7 @@ void GlobalSettings::Init() {
|
||||
this->bHackEnabled = CreateConVar("u_enabled", "1", "Hack enabled (GLOBAL)");
|
||||
this->bIgnoreTaunting = CreateConVar("u_ignore_taunting", "1", "Ignore taunting players");
|
||||
this->flForceFOV = CreateConVar("u_fov", "90", "Forces FOV");
|
||||
this->bProfiler = CreateConVar("u_profiler", "0", "Profiler output enabled");
|
||||
}
|
||||
|
||||
GlobalSettings g_Settings;
|
||||
|
@ -17,6 +17,7 @@ public:
|
||||
ConVar* flForceFOV;
|
||||
ConVar* bHackEnabled;
|
||||
ConVar* bIgnoreTaunting;
|
||||
ConVar* bProfiler;
|
||||
};
|
||||
|
||||
extern GlobalSettings g_Settings;
|
||||
|
@ -77,7 +77,6 @@ typedef void(OverrideView_t)(void*, CViewSetup*);
|
||||
bool hack::invalidated = true;
|
||||
|
||||
void hack::Hk_OverrideView(void* thisptr, CViewSetup* setup) {
|
||||
PROF_BEGIN("OverrideView Hook");
|
||||
((OverrideView_t*)hooks::hkCreateMove->GetMethod(hooks::offOverrideView))(thisptr, setup);
|
||||
if (g_Settings.flForceFOV && g_Settings.flForceFOV->GetBool()) {
|
||||
setup->fov = g_Settings.flForceFOV->GetFloat();
|
||||
@ -110,7 +109,9 @@ void hack::Hk_PaintTraverse(void* p, unsigned int vp, bool fr, bool ar) {
|
||||
if (draw::panel_top == vp) {
|
||||
ResetStrings();
|
||||
for (IHack* i_hack : hack::hacks) {
|
||||
//PROF_BEGIN();
|
||||
i_hack->PaintTraverse(p, vp, fr, ar);
|
||||
//PROF_END(strfmt("%s PaintTraverse", i_hack->GetName()));
|
||||
}
|
||||
Vector screen;
|
||||
for (int i = 0; i < gEntityCache.m_nMax && i < interfaces::entityList->GetHighestEntityIndex(); i++) {
|
||||
@ -122,7 +123,6 @@ void hack::Hk_PaintTraverse(void* p, unsigned int vp, bool fr, bool ar) {
|
||||
ESPStringCompound str = ce->GetESPString(j);
|
||||
//logging::Info("drawing [idx=%i][ns=%i] %s", i, ce->m_nESPStrings, str.m_String);
|
||||
if (!ce->m_ESPOrigin.IsZero(1.0)) {
|
||||
int sw, sh;
|
||||
draw::DrawString(ce->m_ESPOrigin.x, ce->m_ESPOrigin.y, str.m_Color, str.m_Background, false, str.m_String);
|
||||
ce->m_ESPOrigin.y += 12;
|
||||
} else {
|
||||
@ -153,10 +153,12 @@ bool hack::Hk_CreateMove(void* thisptr, float inputSample, CUserCmd* cmd) {
|
||||
//g_pLocalPlayer->bUseSilentAngles = false;
|
||||
//logging::Info("Inside CreateMove #1");
|
||||
for (IHack* i_hack : hack::hacks) {
|
||||
//PROF_BEGIN();
|
||||
if (!i_hack->CreateMove(thisptr, inputSample, cmd)) {
|
||||
ret = false;
|
||||
//g_pLocalPlayer->bUseSilentAngles = true;
|
||||
}
|
||||
//PROF_END(strfmt("%s CreateMove", i_hack->GetName()));
|
||||
}
|
||||
hack::invalidated = false;
|
||||
//logging::Info("Inside CreateMove #2");
|
||||
|
15
uran/src/hacks/Airstuck.h
Normal file
15
uran/src/hacks/Airstuck.h
Normal file
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Airstuck.h
|
||||
*
|
||||
* Created on: Nov 26, 2016
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#ifndef HACKS_AIRSTUCK_H_
|
||||
#define HACKS_AIRSTUCK_H_
|
||||
|
||||
class Airstuck : public IHack {
|
||||
|
||||
};
|
||||
|
||||
#endif /* HACKS_AIRSTUCK_H_ */
|
@ -11,6 +11,10 @@
|
||||
#include "../helpers.h"
|
||||
#include "../sdk/in_buttons.h"
|
||||
|
||||
const char* AntiAim::GetName() {
|
||||
return "ANTI-AIM";
|
||||
}
|
||||
|
||||
void AntiAim::Create() {
|
||||
this->v_bEnabled = CreateConVar("u_aa_enabled", "0", "Enable AntiAim");
|
||||
this->v_flPitch = CreateConVar("u_aa_pitch", "-89.0", "Pitch");
|
||||
|
@ -15,6 +15,10 @@
|
||||
#include <client_class.h>
|
||||
#include <icliententity.h>
|
||||
|
||||
const char* AntiDisguise::GetName() {
|
||||
return "ANTI-DISGUISE";
|
||||
}
|
||||
|
||||
void AntiDisguise::Create() {
|
||||
v_bEnabled = CreateConVar("u_antidisguise", "1", "Disables spy disguise");
|
||||
}
|
||||
|
@ -21,6 +21,10 @@
|
||||
#include <convar.h>
|
||||
#include <client_class.h>
|
||||
|
||||
const char* AutoReflect::GetName() {
|
||||
return "AUTO-REFLECT";
|
||||
}
|
||||
|
||||
bool IsReflectableProjectile(IClientEntity* ent) {
|
||||
if (!ent) return false;
|
||||
switch (ent->GetClientClass()->m_ClassID) {
|
||||
|
@ -28,6 +28,10 @@
|
||||
|
||||
unsigned long g_nTick = 0;
|
||||
|
||||
const char* FollowBot::GetName() {
|
||||
return "FOLLOWBOT";
|
||||
}
|
||||
|
||||
// TODO
|
||||
bool FollowBot::ShouldPopUber(bool force) {
|
||||
int health_my = g_pLocalPlayer->health;
|
||||
|
@ -26,10 +26,7 @@ enum botpackage {
|
||||
|
||||
class FollowBot : public IHack {
|
||||
public:
|
||||
void Create();
|
||||
bool CreateMove(void*, float, CUserCmd*);
|
||||
void Destroy();
|
||||
void PaintTraverse(void*, unsigned int, bool, bool);
|
||||
DECLARE_HACK();
|
||||
void ProcessEntity(IClientEntity* entity, bool enemy);
|
||||
void Tick(CUserCmd*);
|
||||
int ShouldNotTarget(IClientEntity* ent, bool notrace);
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <cdll_int.h>
|
||||
#include <gametrace.h>
|
||||
#include <engine/IEngineTrace.h>
|
||||
#include <inputsystem/iinputsystem.h>
|
||||
#include "../sdk/in_buttons.h"
|
||||
|
||||
Vector viewangles_old;
|
||||
@ -33,6 +34,10 @@ bool fix_silent;
|
||||
|
||||
int target_lock;
|
||||
|
||||
const char* HAimbot::GetName() {
|
||||
return "AIMBOT";
|
||||
}
|
||||
|
||||
/* null-safe */
|
||||
void HAimbot::Create() {
|
||||
this->v_bEnabled = CreateConVar("u_aimbot_enabled", "0", "Enables aimbot. EXPERIMENTAL AND TOTALLY NOT LEGIT");
|
||||
@ -54,12 +59,23 @@ void HAimbot::Create() {
|
||||
this->v_bDebug = CreateConVar("u_aimbot_debug", "0", "Aimbot debug");
|
||||
this->v_iFOV = CreateConVar("u_aimbot_fov", "0", "FOV aimbot (experimental)");
|
||||
this->v_bMachinaPenetration = CreateConVar("u_aimbot_machina", "0", "Machina penetration aimbot (just for fun)");
|
||||
this->v_bSmooth = CreateConVar("u_aimbot_smooth", "0", "Smooth aimbot");
|
||||
this->v_fSmoothValue = CreateConVar("u_aimbot_smooth_value", "5.0", "Smooth value");
|
||||
this->v_iAimKey = CreateConVar("u_aimbot_aimkey", "0", "Aim Key");
|
||||
fix_silent = false;
|
||||
}
|
||||
|
||||
bool HAimbot::CreateMove(void*, float, CUserCmd* cmd) {
|
||||
if (!this->v_bEnabled->GetBool()) return true;
|
||||
this->m_iLastTarget = -1;
|
||||
if (this->v_iAimKey->GetBool()) {
|
||||
//bool down = false;
|
||||
//interfaces::baseClient->IN_IsKeyDown(this->v_iAimKey->GetString(), down);
|
||||
if (!interfaces::input->IsButtonDown((ButtonCode_t)this->v_iAimKey->GetInt())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->v_bEnabledAttacking->GetBool() && !(cmd->buttons & IN_ATTACK)) {
|
||||
return true;
|
||||
}
|
||||
@ -274,11 +290,22 @@ bool HAimbot::Aim(IClientEntity* entity, CUserCmd* cmd) {
|
||||
Vector tr = (hit - g_pLocalPlayer->v_Eye);
|
||||
fVectorAngles(tr, angles);
|
||||
fClampAngle(angles);
|
||||
bool smoothed = false;
|
||||
if (this->v_bSmooth->GetBool()) {
|
||||
Vector da = (angles - g_pLocalPlayer->v_OrigViewangles);
|
||||
float fact = sqrt(da.x * da.x + da.y * da.y);
|
||||
if (fact > this->v_fSmoothValue->GetFloat()) {
|
||||
da.x = da.x / fact;
|
||||
da.y = da.y / fact;
|
||||
}
|
||||
angles = g_pLocalPlayer->v_OrigViewangles + da;
|
||||
smoothed = true;
|
||||
}
|
||||
cmd->viewangles = angles;
|
||||
if (this->v_bSilent->GetBool()) {
|
||||
g_pLocalPlayer->bUseSilentAngles = true;
|
||||
}
|
||||
if (this->v_bAutoShoot->GetBool()) {
|
||||
if (!smoothed && this->v_bAutoShoot->GetBool()) {
|
||||
if (g_pLocalPlayer->clazz == tf_class::tf_sniper) {
|
||||
if (g_pLocalPlayer->cond_0 & cond::zoomed) {
|
||||
if (this->v_iAutoShootCharge->GetBool()) {
|
||||
|
@ -15,10 +15,7 @@ class IClientEntity;
|
||||
|
||||
class HAimbot : public IHack {
|
||||
public:
|
||||
void Create();
|
||||
void Destroy();
|
||||
bool CreateMove(void*, float, CUserCmd*);
|
||||
void PaintTraverse(void*, unsigned int, bool, bool);
|
||||
DECLARE_HACK();
|
||||
bool ShouldTarget(IClientEntity* entity);
|
||||
bool Aim(IClientEntity* entity, CUserCmd* cmd);
|
||||
bool m_bProjectileMode;
|
||||
@ -26,6 +23,9 @@ public:
|
||||
bool m_bProjArc;
|
||||
int m_iLastTarget;
|
||||
int m_iHitbox;
|
||||
ConVar* v_iAimKey;
|
||||
ConVar* v_bSmooth;
|
||||
ConVar* v_fSmoothValue;
|
||||
ConVar* v_bDebug;
|
||||
ConVar* v_bEnabled;
|
||||
ConVar* v_iFOV;
|
||||
|
@ -20,6 +20,10 @@
|
||||
#include <icliententity.h>
|
||||
#include <tier1/convar.h>
|
||||
|
||||
const char* HBunnyhop::GetName() {
|
||||
return "BUNNYHOP";
|
||||
}
|
||||
|
||||
void HBunnyhop::Create() {
|
||||
this->v_bEnabled = CreateConVar("u_bhop_enabled", "1", "Enable/Disable BunnyHop");
|
||||
}
|
||||
|
@ -14,10 +14,7 @@ class ConVar;
|
||||
|
||||
class HBunnyhop : public IHack {
|
||||
public:
|
||||
bool CreateMove(void*, float, CUserCmd*);
|
||||
void PaintTraverse(void*, unsigned int, bool, bool);
|
||||
void Create();
|
||||
void Destroy();
|
||||
DECLARE_HACK();
|
||||
ConVar* v_bEnabled;
|
||||
};
|
||||
|
||||
|
@ -24,6 +24,10 @@
|
||||
#include <tier1/convar.h>
|
||||
#include <cmodel.h>
|
||||
|
||||
const char* HEsp::GetName() {
|
||||
return "ESP";
|
||||
}
|
||||
|
||||
const char* classes[] = {
|
||||
"Scout",
|
||||
"Sniper",
|
||||
@ -90,10 +94,11 @@ void HEsp::DrawBox(CachedEntity* ent, Color clr, float widthFactor, float addHei
|
||||
//draw::DrawString(min(smin.x, smax.x), min(smin.y, smax.y), clr, false, "min");
|
||||
//draw::DrawString(max(smin.x, smax.x), max(smin.y, smax.y), clr, false, "max");
|
||||
//draw::DrawString((int)so.x, (int)so.y, draw::white, false, "origin");
|
||||
ent->m_ESPOrigin.x = so.x + width / 2 + 3;
|
||||
ent->m_ESPOrigin.x = so.x + width / 2 + 1;
|
||||
ent->m_ESPOrigin.y = so.y - height;
|
||||
draw::OutlineRect(so.x - width / 2 - 1, so.y - 1 - height, width + 2, height + 2, draw::black);
|
||||
draw::OutlineRect(so.x - width / 2, so.y - height, width, height, clr);
|
||||
draw::OutlineRect(so.x - width / 2 + 1, so.y + 1 - height, width - 2, height - 2, draw::black);
|
||||
if (healthbar) {
|
||||
Color hp = colors::GetHealthColor(health, healthmax);
|
||||
int hbh = (height) * min((float)health / (float)healthmax, 1.0f);
|
||||
|
@ -16,10 +16,7 @@ class CachedEntity;
|
||||
|
||||
class HEsp : public IHack {
|
||||
public:
|
||||
bool CreateMove(void*, float, CUserCmd*);
|
||||
void PaintTraverse(void*, unsigned int, bool, bool);
|
||||
void Create();
|
||||
void Destroy();
|
||||
DECLARE_HACK();
|
||||
void DrawBox(CachedEntity* ent, Color clr, float widthFactor, float addHeight, bool healthbar, int health, int healthmax);
|
||||
void ProcessEntity(CachedEntity* ent);
|
||||
void ProcessEntityPT(CachedEntity* ent);
|
||||
|
@ -29,6 +29,10 @@
|
||||
#include <client_class.h>
|
||||
#include <tier1/convar.h>
|
||||
|
||||
const char* HTrigger::GetName() {
|
||||
return "TRIGGER";
|
||||
}
|
||||
|
||||
Vector eye;
|
||||
trace_t* enemy_trace;
|
||||
trace::FilterDefault* filter;
|
||||
|
@ -14,10 +14,7 @@ class ConVar;
|
||||
|
||||
class HTrigger : public IHack {
|
||||
public:
|
||||
bool CreateMove(void*, float, CUserCmd*);
|
||||
void PaintTraverse(void*, unsigned int, bool, bool);
|
||||
void Create();
|
||||
void Destroy();
|
||||
DECLARE_HACK();
|
||||
ConVar* v_bEnabled;
|
||||
ConVar* v_bIgnoreCloak;
|
||||
ConVar* v_bZoomedOnly;
|
||||
|
@ -16,6 +16,7 @@ class CCommand;
|
||||
typedef unsigned int uint32;
|
||||
|
||||
#define DECLARE_HACK() \
|
||||
virtual const char* GetName(); \
|
||||
void Create(); \
|
||||
bool CreateMove(void*, float, CUserCmd*); \
|
||||
void Destroy(); \
|
||||
@ -24,6 +25,7 @@ typedef unsigned int uint32;
|
||||
class IHack {
|
||||
public:
|
||||
inline virtual ~IHack() {};
|
||||
virtual const char* GetName() = 0;
|
||||
inline virtual void PaintTraverse(void*, unsigned int, bool, bool) {};
|
||||
inline virtual bool CreateMove(void*, float, CUserCmd*) { return true; };
|
||||
inline virtual void Create() {};
|
||||
|
@ -29,6 +29,10 @@
|
||||
#include <dt_common.h>
|
||||
#include <inputsystem/iinputsystem.h>
|
||||
|
||||
const char* Misc::GetName() {
|
||||
return "MISC";
|
||||
}
|
||||
|
||||
void CC_SayLines(const CCommand& args) {
|
||||
char cmd[256];
|
||||
sprintf(cmd, "say %s", args.ArgS());
|
||||
|
@ -15,10 +15,7 @@ class ConCommand;
|
||||
|
||||
class Misc : public IHack {
|
||||
public:
|
||||
void Create();
|
||||
bool CreateMove(void*, float, CUserCmd*);
|
||||
void Destroy();
|
||||
void PaintTraverse(void*, unsigned int, bool, bool);
|
||||
DECLARE_HACK();
|
||||
ConVar* v_bNoFlinch;
|
||||
ConVar* v_bNoZoom;
|
||||
|
||||
|
@ -17,6 +17,10 @@
|
||||
#include <icliententity.h>
|
||||
#include <client_class.h>
|
||||
|
||||
const char* Quickscope::GetName() {
|
||||
return "QUICKSCOPE";
|
||||
}
|
||||
|
||||
void Quickscope::Create() {
|
||||
v_bEnabled = CreateConVar("u_quickscope", "1", "Quickscope mode");
|
||||
}
|
||||
|
@ -8,29 +8,31 @@
|
||||
#include "profiler.h"
|
||||
|
||||
#include "logging.h"
|
||||
#include "globals.h"
|
||||
|
||||
#include "fixsdk.h"
|
||||
#include <convar.h>
|
||||
|
||||
int g_ProfilerDepth = 0;
|
||||
char* g_ProfilerSections[MAX_PROFILER_SECTIONS];
|
||||
time_t g_ProfilerSectionsTime[MAX_PROFILER_SECTIONS];
|
||||
time_t g_ProfilerSections[MAX_PROFILER_SECTIONS];
|
||||
|
||||
void BeginSection(char* name) {
|
||||
void PROFILER_BeginSection() {
|
||||
if (!ENABLE_PROFILER) return;
|
||||
if (g_ProfilerDepth == MAX_PROFILER_SECTIONS - 1) {
|
||||
logging::Info("Max profiler depth reached!");
|
||||
return;
|
||||
}
|
||||
g_ProfilerSections[g_ProfilerDepth] = name;
|
||||
g_ProfilerSectionsTime[g_ProfilerDepth] = time(0);
|
||||
g_ProfilerDepth++;
|
||||
g_ProfilerSections[g_ProfilerDepth] = time(0);
|
||||
}
|
||||
|
||||
void EndSection(char* name) {
|
||||
void PROFILER_EndSection(char* name) {
|
||||
if (!ENABLE_PROFILER) return;
|
||||
if (g_ProfilerDepth == 0) {
|
||||
logging::Info("Profiler underflow!");
|
||||
return;
|
||||
}
|
||||
if (g_ProfilerDepth <= PROFILER_OUTPUT_DEPTH)
|
||||
logging::Info("[PROF] %s took %lums!", g_ProfilerSections[g_ProfilerDepth], time(0) - g_ProfilerSectionsTime[g_ProfilerDepth]);
|
||||
if (g_ProfilerDepth <= PROFILER_OUTPUT_DEPTH && g_Settings.bProfiler->GetBool())
|
||||
logging::Info("[PROF] %s took %ims!", name, (time(0) - g_ProfilerSections[g_ProfilerDepth]));
|
||||
g_ProfilerDepth--;
|
||||
}
|
||||
|
@ -10,19 +10,19 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define ENABLE_PROFILER true
|
||||
#define ENABLE_PROFILER false
|
||||
#define PROFILER_OUTPUT_DEPTH 1
|
||||
#define MAX_PROFILER_SECTIONS 16
|
||||
|
||||
#if ENABLE_PROFILER == true
|
||||
#define PROF_BEGIN(X) PROFILER_BeginSection(X)
|
||||
#define PROF_BEGIN() PROFILER_BeginSection()
|
||||
#define PROF_END(X) PROFILER_EndSection(X)
|
||||
#else
|
||||
#define PROF_BEGIN(X)
|
||||
#define PROF_END(X)
|
||||
#endif
|
||||
|
||||
void PROFILER_BeginSection(const char* name);
|
||||
void PROFILER_EndSection(const char* name);
|
||||
void PROFILER_BeginSection();
|
||||
void PROFILER_EndSection(char* name);
|
||||
|
||||
#endif /* PROFILER_H_ */
|
||||
|
Reference in New Issue
Block a user