commit
78dee3a4ae
@ -12,6 +12,7 @@
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/uran/Debug"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/uran/TF2"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/cathook/TF2"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/cathook"/>
|
||||
<entry flags="RESOLVED" kind="libraryFile" name="UranHack" srcPrefixMapping="" srcRootPath=""/>
|
||||
<entry flags="RESOLVED" kind="libraryFile" name="uran" srcPrefixMapping="" srcRootPath=""/>
|
||||
<entry flags="RESOLVED" kind="libraryFile" name="cathook" srcPrefixMapping="" srcRootPath=""/>
|
||||
@ -31,7 +32,7 @@
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1168214098." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.965909756" name="Linux GCC" nonInternalBuilderId="cdt.managedbuild.target.gnu.builder.exe.debug" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.1799148153" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/cathook}/TF2" id="cdt.managedbuild.target.gnu.builder.exe.debug.1548213350" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/cathook}" id="cdt.managedbuild.target.gnu.builder.exe.debug.1548213350" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.782611349" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.883030293" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.908662295" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
@ -108,7 +109,6 @@
|
||||
<entry excluding="depr" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/gui"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/ipc"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/segvcatch"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/targeting"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
@ -163,7 +163,6 @@
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/hooks"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/ipc"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/segvcatch"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/targeting"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
@ -260,7 +259,6 @@
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/hooks"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/ipc"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/segvcatch"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/targeting"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
@ -355,7 +353,6 @@
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/hooks"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/ipc"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/segvcatch"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/targeting"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
@ -1,2 +1,5 @@
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
#undef private
|
||||
#undef public
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "textfile.h"
|
||||
#include "gui/GUI.h"
|
||||
#include "classid.h"
|
||||
#include "crits.h"
|
||||
|
||||
#include "hacks/hacklist.h"
|
||||
#include "glowobjects.h"
|
||||
@ -52,7 +53,7 @@
|
||||
#ifndef CATHOOK_BUILD_NUMBER
|
||||
#define CATHOOK_BUILD_NUMBER "LATEST"
|
||||
#endif
|
||||
#define CATHOOK_BUILD_NAME "Butterscotch Pie"
|
||||
#define CATHOOK_BUILD_NAME "Cat's Eye"
|
||||
|
||||
#define CON_NAME "cat"
|
||||
#define CON_PREFIX CON_NAME "_"
|
||||
|
69
src/crits.cpp
Normal file
69
src/crits.cpp
Normal file
@ -0,0 +1,69 @@
|
||||
/*
|
||||
* crits.cpp
|
||||
*
|
||||
* Created on: Feb 25, 2017
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#include "crits.h"
|
||||
#include "common.h"
|
||||
#include "sharedobj.h"
|
||||
#include "copypasted/CSignature.h"
|
||||
#include <link.h>
|
||||
|
||||
bool RandomCrits() {
|
||||
static ConVar* tf_weapon_criticals = interfaces::cvar->FindVar("tf_weapon_criticals");
|
||||
return tf_weapon_criticals->GetBool();
|
||||
}
|
||||
|
||||
bool WeaponCanCrit() {
|
||||
return TF && CE_GOOD(LOCAL_W) && vfunc<bool(*)(IClientEntity*)>(RAW_ENT(LOCAL_W), 465 + 21, 0)(RAW_ENT(LOCAL_W));
|
||||
}
|
||||
|
||||
bool IsAttackACrit(CUserCmd* cmd) {
|
||||
if (CE_GOOD(LOCAL_W) && TF) {
|
||||
IClientEntity* weapon = RAW_ENT(LOCAL_W);
|
||||
if (TF2C) {
|
||||
if (vfunc<bool(*)(IClientEntity*)>(weapon, 1824 / 4, 0)(weapon)) {
|
||||
static uintptr_t CalcIsAttackCritical_s = gSignatures.GetClientSignature("55 89 E5 56 53 83 EC 10 8B 5D 08 89 1C 24 E8 ? ? ? ? 85 C0 89 C6 74 59 8B 00 89 34 24 FF 90 E0 02 00 00 84 C0 74 4A A1 ? ? ? ? 8B 40 04 3B 83 A8 09 00 00 74 3A");
|
||||
typedef void(*CalcIsAttackCritical_t)(IClientEntity*);
|
||||
CalcIsAttackCritical_t CIACFn = (CalcIsAttackCritical_t)(CalcIsAttackCritical_s);
|
||||
*(float*)((uintptr_t)weapon + 2468ul) = 0.0f;
|
||||
int tries = 0;
|
||||
static int lcmdn = 0;
|
||||
if (*(bool*)((uintptr_t)RAW_ENT(LOCAL_W) + 2454ul)) return true;
|
||||
static int& seed = *(int*)(sharedobj::client->lmap->l_addr + 0x00D53F68ul);
|
||||
bool cmds = false;
|
||||
seed = MD5_PseudoRandom(cmd->command_number) & 0x7fffffff;
|
||||
RandomSeed(seed);
|
||||
CIACFn(RAW_ENT(LOCAL_W));
|
||||
return *(bool*)((uintptr_t)RAW_ENT(LOCAL_W) + 2454ul);
|
||||
}
|
||||
} else if (TF2) {
|
||||
if (vfunc<bool(*)(IClientEntity*)>(weapon, 1944 / 4, 0)(weapon)) {
|
||||
static uintptr_t CalcIsAttackCritical_s = gSignatures.GetClientSignature("55 89 E5 83 EC 28 89 5D F4 8B 5D 08 89 75 F8 89 7D FC 89 1C 24 E8 ? ? ? ? 85 C0 89 C6 74 60 8B 00 89 34 24 FF 90 E0 02 00 00 84 C0 74 51 A1 ? ? ? ? 8B 40 04");
|
||||
typedef void(*CalcIsAttackCritical_t)(IClientEntity*);
|
||||
CalcIsAttackCritical_t CIACFn = (CalcIsAttackCritical_t)(CalcIsAttackCritical_s);
|
||||
if (cmd->command_number) {
|
||||
int tries = 0;
|
||||
static int cmdn = 0;
|
||||
bool chc = false;
|
||||
int md5seed = MD5_PseudoRandom(cmd->command_number) & 0x7fffffff;
|
||||
int rseed = md5seed;
|
||||
float bucket = *(float*)((uintptr_t)RAW_ENT(LOCAL_W) + 2612u);
|
||||
int& a = *(int*)((uintptr_t)(sharedobj::client->lmap->l_addr) + 0x01F8B228);
|
||||
a = md5seed;
|
||||
int c = LOCAL_W->m_IDX << 8;
|
||||
int b = LOCAL_E->m_IDX;
|
||||
rseed = rseed ^ (b | c);
|
||||
*(float*)(weapon + 2856ul) = 0.0f;
|
||||
RandomSeed(rseed);
|
||||
bool crits = vfunc<bool(*)(IClientEntity*)>(weapon, 1836 / 4, 0)(weapon);
|
||||
//if (!crits) *(float*)((uintptr_t)RAW_ENT(LOCAL_W) + 2612u) = bucket;
|
||||
return crits;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
21
src/crits.h
Normal file
21
src/crits.h
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* crits.h
|
||||
*
|
||||
* Created on: Feb 25, 2017
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#ifndef CRITS_H_
|
||||
#define CRITS_H_
|
||||
|
||||
class CUserCmd;
|
||||
class IClientEntity;
|
||||
|
||||
bool RandomCrits();
|
||||
bool WeaponCanCrit();
|
||||
bool IsAttackACrit(CUserCmd* cmd);
|
||||
|
||||
//bool CalcIsAttackCritical(IClientEntity* weapon);
|
||||
|
||||
|
||||
#endif /* CRITS_H_ */
|
@ -10,18 +10,63 @@
|
||||
#include "common.h"
|
||||
#include "sdk.h"
|
||||
|
||||
CatVar::CatVar(CatVar_t type, std::string name, std::string value, std::string help, ICatEnum* enum_type, std::string long_description, bool hasminmax, float maxv, float minv) {
|
||||
m_Type = type;
|
||||
m_pConVar = CreateConVar(CON_PREFIX + name, value, help);
|
||||
m_EnumType = enum_type;
|
||||
m_flMinValue = minv;
|
||||
m_flMaxValue = maxv;
|
||||
m_bHasMinmax = hasminmax;
|
||||
SetDescription(long_description);
|
||||
CatVar::CatVar(CatVar_t type, std::string name, std::string value, std::string help, CatEnum* enum_type, std::string long_description, bool hasminmax, float maxv, float minv)
|
||||
: type(type), name(name), defaults(value), desc_short(help), desc_long(long_description), enum_type(enum_type) {
|
||||
min = minv;
|
||||
max = maxv;
|
||||
restricted = hasminmax;
|
||||
g_UnregisteredCatVars.push(this);
|
||||
}
|
||||
|
||||
CatEnum::CatEnum(std::vector<std::string> values, int min) {
|
||||
m_values = values;
|
||||
CatVar::CatVar(CatVar_t type, std::string name, std::string defaults, std::string desc_short, std::string desc_long)
|
||||
: type(type), name(name), defaults(defaults), desc_short(desc_short), desc_long(desc_long), enum_type(nullptr), restricted(false) {
|
||||
// For some reason, adding min(0.0f), max(0.0f) gives a compilation error.
|
||||
min = 0.0f;
|
||||
max = 0.0f;
|
||||
g_UnregisteredCatVars.push(this);
|
||||
}
|
||||
|
||||
CatVar::CatVar(CatVar_t type, std::string name, std::string defaults, std::string desc_short, std::string desc_long, float max_val)
|
||||
: type(type), name(name), defaults(defaults), desc_short(desc_short), desc_long(desc_long), enum_type(nullptr), restricted(true) {
|
||||
min = 0.0f;
|
||||
max = max_val;
|
||||
g_UnregisteredCatVars.push(this);
|
||||
}
|
||||
|
||||
CatVar::CatVar(CatVar_t type, std::string name, std::string defaults, std::string desc_short, std::string desc_long, float min_val, float max_val)
|
||||
: type(type), name(name), defaults(defaults), desc_short(desc_short), desc_long(desc_long), enum_type(nullptr), restricted(true) {
|
||||
min = min_val;
|
||||
max = max_val;
|
||||
g_UnregisteredCatVars.push(this);
|
||||
}
|
||||
|
||||
CatVar::CatVar(CatVar_t type, std::string name, std::string defaults, std::string desc_short, std::string desc_long, CatEnum& cat_enum)
|
||||
: type(type), name(name), defaults(defaults), desc_short(desc_short), desc_long(desc_long), enum_type(&cat_enum), restricted(true) {
|
||||
min = cat_enum.Minimum();
|
||||
max = cat_enum.Maximum();
|
||||
g_UnregisteredCatVars.push(this);
|
||||
}
|
||||
|
||||
void CatVar::Register() {
|
||||
convar = CreateConVar(CON_PREFIX + name, defaults, desc_short);
|
||||
convar_parent = convar->m_pParent;
|
||||
while (!callbacks.empty()) {
|
||||
callbacks.top()(this);
|
||||
callbacks.pop();
|
||||
}
|
||||
registered = true;
|
||||
}
|
||||
|
||||
std::stack<CatVar*> g_UnregisteredCatVars;
|
||||
void RegisterCatVars() {
|
||||
while (g_UnregisteredCatVars.size()) {
|
||||
CatVar* var = g_UnregisteredCatVars.top();
|
||||
var->Register();
|
||||
g_UnregisteredCatVars.pop();
|
||||
}
|
||||
}
|
||||
|
||||
CatEnum::CatEnum(std::vector<std::string> values, int min) : m_values(values) {
|
||||
m_iMin = min;
|
||||
m_iMax = min + values.size() - 1;
|
||||
m_iLength = values.size();
|
||||
@ -34,74 +79,11 @@ std::string CatEnum::Name(int value) {
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
int CatEnum::Maximum() {
|
||||
int CatEnum::Maximum() const {
|
||||
return m_iMax;
|
||||
}
|
||||
|
||||
int CatEnum::Minimum() {
|
||||
int CatEnum::Minimum() const {
|
||||
return m_iMin;
|
||||
}
|
||||
|
||||
bool CatVar::GetBool() { return m_pConVar->GetBool(); }
|
||||
int CatVar::GetInt() { return m_pConVar->GetInt(); }
|
||||
float CatVar::GetFloat() { return m_pConVar->GetFloat(); }
|
||||
const char* CatVar::GetString() { return m_pConVar->GetString(); }
|
||||
|
||||
void CatVar::SetValue(float value) {
|
||||
m_pConVar->SetValue(value);
|
||||
}
|
||||
|
||||
void CatVar::SetValue(std::string value) {
|
||||
m_pConVar->SetValue(value.c_str());
|
||||
}
|
||||
|
||||
void CatVar::SetValue(int value) {
|
||||
m_pConVar->SetValue(value);
|
||||
}
|
||||
|
||||
void CatVar::Increment(int factor) {
|
||||
if (!m_pConVar) return;
|
||||
switch (m_Type) {
|
||||
case CatVar_t::CV_SWITCH: {
|
||||
m_pConVar->SetValue(!m_pConVar->GetInt());
|
||||
} break;
|
||||
case CatVar_t::CV_INT:
|
||||
m_pConVar->SetValue(m_pConVar->GetInt() + factor * m_fStep);
|
||||
break;
|
||||
case CatVar_t::CV_FLOAT:
|
||||
m_pConVar->SetValue(m_pConVar->GetFloat() + (float)factor * m_fStep);
|
||||
break;
|
||||
case CatVar_t::CV_ENUM: {
|
||||
int cur = m_pConVar->GetInt();
|
||||
int newv = cur + 1;
|
||||
if (newv > m_EnumType->Maximum()) {
|
||||
newv = m_EnumType->Minimum();
|
||||
}
|
||||
m_pConVar->SetValue(newv);
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
void CatVar::Decrement(int factor) {
|
||||
if (!m_pConVar) return;
|
||||
switch (m_Type) {
|
||||
case CatVar_t::CV_SWITCH:
|
||||
m_pConVar->SetValue((int)!m_pConVar->GetInt());
|
||||
break;
|
||||
case CatVar_t::CV_INT:
|
||||
m_pConVar->SetValue(m_pConVar->GetInt() - factor * m_fStep);
|
||||
break;
|
||||
case CatVar_t::CV_FLOAT:
|
||||
m_pConVar->SetValue(m_pConVar->GetFloat() - (float)factor * m_fStep);
|
||||
break;
|
||||
case CatVar_t::CV_ENUM: {
|
||||
int cur = m_pConVar->GetInt();
|
||||
int newv = cur - 1;
|
||||
if (newv < m_EnumType->Minimum()) {
|
||||
newv = m_EnumType->Maximum() - 1;
|
||||
}
|
||||
m_pConVar->SetValue(newv);
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,9 +10,13 @@
|
||||
|
||||
class ConVar;
|
||||
|
||||
#include "sdk.h"
|
||||
|
||||
#include "beforecheaders.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
#include <stack>
|
||||
#include "aftercheaders.h"
|
||||
|
||||
//#define CREATE_CV(type, name, defaults, description) \
|
||||
@ -30,21 +34,13 @@ enum CatVar_t {
|
||||
CV_KEY
|
||||
};
|
||||
|
||||
class ICatEnum {
|
||||
public:
|
||||
inline virtual ~ICatEnum() {}
|
||||
virtual std::string Name(int value) = 0;
|
||||
virtual int Minimum() = 0;
|
||||
virtual int Maximum() = 0;
|
||||
};
|
||||
|
||||
class CatEnum : public ICatEnum {
|
||||
class CatEnum {
|
||||
public:
|
||||
CatEnum(std::vector<std::string> values, int min = 0);
|
||||
virtual std::string Name(int value);
|
||||
virtual int Maximum();
|
||||
virtual int Minimum();
|
||||
std::vector<std::string> m_values;
|
||||
std::string Name(int value);
|
||||
int Maximum() const ;
|
||||
int Minimum() const ;
|
||||
const std::vector<std::string> m_values;
|
||||
int m_iMin;
|
||||
int m_iMax;
|
||||
int m_iLength;
|
||||
@ -52,37 +48,59 @@ public:
|
||||
|
||||
class CatVar {
|
||||
public:
|
||||
CatVar(CatVar_t type, std::string name, std::string value, std::string help, ICatEnum* enum_type = 0, std::string long_description = "no description", bool hasminmax = false, float max = 1.0f, float min = 0.0f);
|
||||
//inline CatVar(ConVar* var, CatVar_t type, std::string desc = "") { m_fStep = 1; m_fStep = 0.5f; m_pConVar = var; m_Type = type; SetDescription(desc); }
|
||||
//inline CatVar(ConVar* var, ICatEnum* catenum, std::string desc = "") { m_pConVar = var; m_Type = CatVar_t::CV_ENUM; m_EnumType = catenum; SetDescription(desc); }
|
||||
inline CatVar_t GetType() { return m_Type; }
|
||||
inline ICatEnum* GetEnum() { return m_EnumType; }
|
||||
inline ConVar* GetConVar() { return m_pConVar; }
|
||||
inline void SetDescription(std::string description) { m_strDescription = description; }
|
||||
inline std::string Description() { return m_strDescription; }
|
||||
[[deprecated]]
|
||||
CatVar(CatVar_t type, std::string name, std::string value, std::string help, CatEnum* enum_type = 0, std::string long_description = "no description", bool hasminmax = false, float max = 1.0f, float min = 0.0f);
|
||||
|
||||
bool GetBool();
|
||||
int GetInt();
|
||||
float GetFloat();
|
||||
const char* GetString();
|
||||
void SetValue(float value);
|
||||
void SetValue(std::string value);
|
||||
void SetValue(int value);
|
||||
CatVar(CatVar_t type, std::string name, std::string defaults, std::string desc_short, std::string desc_long);
|
||||
CatVar(CatVar_t type, std::string name, std::string defaults, std::string desc_short, std::string desc_long, float max_val);
|
||||
CatVar(CatVar_t type, std::string name, std::string defaults, std::string desc_short, std::string desc_long, float min_val, float max_val);
|
||||
CatVar(CatVar_t type, std::string name, std::string defaults, std::string desc_short, std::string desc_long, CatEnum& cat_enum);
|
||||
|
||||
void Increment(int factor = 1);
|
||||
void Decrement(int factor = 1);
|
||||
inline explicit operator bool() const { return !!convar_parent->m_nValue; }
|
||||
inline explicit operator int() const { return convar_parent->m_nValue; }
|
||||
inline explicit operator float() const { return convar_parent->m_fValue; }
|
||||
inline void operator =(const int& value) { convar_parent->InternalSetIntValue(value); }
|
||||
inline void operator =(const float& value) { convar_parent->InternalSetFloatValue(value); }
|
||||
inline bool operator ==(const int& value) const { return convar_parent->m_nValue == value; }
|
||||
inline bool operator ==(const float& value) const { return convar_parent->m_fValue == value; }
|
||||
|
||||
inline void SetStep(float step) { m_fStep = step; }
|
||||
void Register();
|
||||
typedef std::function<void(CatVar*)> RegisterCallbackFn;
|
||||
std::stack<RegisterCallbackFn> callbacks;
|
||||
inline void OnRegister(RegisterCallbackFn fn) {
|
||||
if (registered) fn(this);
|
||||
else callbacks.push(fn);
|
||||
}
|
||||
|
||||
bool m_bHasMinmax;
|
||||
float m_flMaxValue;
|
||||
float m_flMinValue;
|
||||
float m_fStep;
|
||||
[[deprecated]]
|
||||
inline bool GetBool() const { return this->operator bool(); }
|
||||
[[deprecated]]
|
||||
inline int GetInt() const { return this->operator int(); }
|
||||
[[deprecated]]
|
||||
inline float GetFloat() const { return this->operator float(); };
|
||||
inline const char* GetString() const { return convar_parent->GetString(); }
|
||||
[[deprecated]]
|
||||
inline void SetValue(float value) { this->operator =(value); }
|
||||
inline void SetValue(std::string value) { convar_parent->SetValue(value.c_str()); }
|
||||
[[deprecated]]
|
||||
inline void SetValue(int value) { this->operator =(value); }
|
||||
|
||||
std::string m_strDescription;
|
||||
ICatEnum* m_EnumType;
|
||||
CatVar_t m_Type;
|
||||
ConVar* m_pConVar;
|
||||
bool restricted;
|
||||
float max;
|
||||
float min;
|
||||
bool registered;
|
||||
|
||||
const CatVar_t type;
|
||||
const std::string name;
|
||||
const std::string defaults;
|
||||
const std::string desc_short;
|
||||
const std::string desc_long;
|
||||
CatEnum* enum_type;
|
||||
ConVar* convar;
|
||||
ConVar* convar_parent;
|
||||
};
|
||||
|
||||
extern std::stack<CatVar*> g_UnregisteredCatVars;
|
||||
void RegisterCatVars();
|
||||
|
||||
#endif /* CVWRAPPER_H_ */
|
||||
|
@ -275,8 +275,8 @@ void draw::Initialize() {
|
||||
interfaces::engineClient->GetScreenSize(draw::width, draw::height);
|
||||
}
|
||||
|
||||
interfaces::surface->SetFontGlyphSet(fonts::ESP, "TF2 Build", fonts::ESP_HEIGHT, 0, 0, 0, 0x0); // or Ubuntu Mono Bold
|
||||
interfaces::surface->SetFontGlyphSet(fonts::MENU, "Verdana", fonts::MENU_HEIGHT, 0, 0, 0, 0x0);
|
||||
interfaces::surface->SetFontGlyphSet(fonts::ESP, "TF2 Build", fonts::ESP_HEIGHT, 0, 0, 0, interfaces::surface->FONTFLAG_DROPSHADOW); // or Ubuntu Mono Bold
|
||||
interfaces::surface->SetFontGlyphSet(fonts::MENU, "Verdana", fonts::MENU_HEIGHT, 0, 0, 0, interfaces::surface->FONTFLAG_DROPSHADOW);
|
||||
interfaces::surface->SetFontGlyphSet(fonts::MENU_BIG, "Verdana Bold", fonts::MENU_BIG_HEIGHT, 0, 0, 0, 0x0);
|
||||
}
|
||||
|
||||
@ -379,7 +379,7 @@ void draw::WString(unsigned long font, int x, int y, int color, int shadow, cons
|
||||
if (shadow) {
|
||||
unsigned char alpha = (color >> 24);
|
||||
int black_t = ((alpha == 255) ? colors::black : colors::Create(0, 0, 0, alpha / shadow));
|
||||
if (shadow > 0) {
|
||||
/*if (shadow > 0) {
|
||||
draw::WString(font, x + 1, y + 1, black_t, false, text);
|
||||
}
|
||||
if (shadow > 1 && !g_Settings.bFastOutline->GetBool()) {
|
||||
@ -390,7 +390,7 @@ void draw::WString(unsigned long font, int x, int y, int color, int shadow, cons
|
||||
draw::WString(font, x, y + 1, black_t, false, text);
|
||||
draw::WString(font, x, y - 1, black_t, false, text);
|
||||
draw::WString(font, x - 1, y, black_t, false, text);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
interfaces::surface->DrawSetTextPos(x, y);
|
||||
interfaces::surface->DrawSetTextColor(*reinterpret_cast<Color*>(&color));
|
||||
|
@ -9,10 +9,7 @@
|
||||
#include "sdk.h"
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#if ENTITY_CACHE_PROFILER == true
|
||||
CatVar* g_vEntityCacheProfiling = 0;
|
||||
#endif
|
||||
#include "profiler.h"
|
||||
|
||||
CachedEntity::CachedEntity() {
|
||||
m_pEntity = nullptr;
|
||||
@ -43,12 +40,8 @@ void EntityCache::Invalidate() {
|
||||
void CachedEntity::Update(int idx) {
|
||||
SEGV_BEGIN
|
||||
|
||||
#if ENTITY_CACHE_PROFILER == true
|
||||
long p_begin = gECP.CurrentTime();
|
||||
#endif
|
||||
m_ESPOrigin.Zero();
|
||||
|
||||
m_nESPStrings = 0;
|
||||
m_IDX = idx;
|
||||
m_pEntity = interfaces::entityList->GetClientEntity(idx);
|
||||
if (!m_pEntity) {
|
||||
@ -76,18 +69,15 @@ void CachedEntity::Update(int idx) {
|
||||
|
||||
m_ItemType = ITEM_NONE;
|
||||
|
||||
m_lSeenTicks = 0;
|
||||
m_lLastSeen = 0;
|
||||
|
||||
m_bGrenadeProjectile = false;
|
||||
m_bBonesSetup = false;
|
||||
|
||||
m_bVisCheckComplete = false;
|
||||
if (m_pHitboxCache) {
|
||||
#if ENTITY_CACHE_PROFILER == true
|
||||
long p_begin = gECP.CurrentTime();
|
||||
#endif
|
||||
SAFE_CALL(m_pHitboxCache->Update());
|
||||
#if ENTITY_CACHE_PROFILER == true
|
||||
gECP.StoreData(ECPNodes::ECPN_HITBOX_UPDATE, p_begin);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (m_iClassID == g_pClassID->C_Player) {
|
||||
@ -153,37 +143,18 @@ void CachedEntity::Update(int idx) {
|
||||
m_bEnemy = (m_iTeam != g_pLocalPlayer->team);
|
||||
m_iHealth = CE_INT(this, netvar.iHealth);
|
||||
m_iMaxHealth = g_pPlayerResource->GetMaxHealth(this);
|
||||
if (IsVisible()) {
|
||||
m_lLastSeen = 0;
|
||||
m_lSeenTicks++;
|
||||
} else {
|
||||
m_lSeenTicks = 0;
|
||||
m_lLastSeen++;
|
||||
}
|
||||
}
|
||||
if (m_Type == EntityType::ENTITY_BUILDING) {
|
||||
m_iTeam = CE_INT(this, netvar.iTeamNum); // TODO
|
||||
m_bEnemy = (m_iTeam != g_pLocalPlayer->team);
|
||||
m_iHealth = CE_INT(this, netvar.iBuildingHealth);
|
||||
m_iMaxHealth = CE_INT(this, netvar.iBuildingMaxHealth);
|
||||
if (IsVisible()) {
|
||||
m_lLastSeen = 0;
|
||||
m_lSeenTicks++;
|
||||
} else {
|
||||
m_lSeenTicks = 0;
|
||||
m_lLastSeen++;
|
||||
}
|
||||
}
|
||||
|
||||
#if ENTITY_CACHE_PROFILER == true
|
||||
gECP.StoreData(ECPN_UPDATE, p_begin);
|
||||
#endif
|
||||
|
||||
SEGV_END_INFO("Updating entity")
|
||||
}
|
||||
|
||||
bool CachedEntity::IsVisible() {
|
||||
long p_begin = gECP.CurrentTime();
|
||||
PROF_SECTION(CE_IsVisible);
|
||||
if (m_bVisCheckComplete) return m_bAnyHitboxVisible;
|
||||
|
||||
bool vischeck0 = false;
|
||||
@ -192,21 +163,32 @@ bool CachedEntity::IsVisible() {
|
||||
if (vischeck0) {
|
||||
m_bAnyHitboxVisible = true;
|
||||
m_bVisCheckComplete = true;
|
||||
gECP.StoreData(ECPN_VISCHECK, p_begin);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (m_Type == ENTITY_PLAYER && g_Settings.bFastVischeck->GetBool()) {
|
||||
static const int hitboxes[] = { hitbox_t::head, hitbox_t::foot_L, hitbox_t::hand_R, hitbox_t::spine_1 };
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (m_pHitboxCache->VisibilityCheck(hitboxes[i])) {
|
||||
m_bAnyHitboxVisible = true;
|
||||
m_bVisCheckComplete = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
m_bAnyHitboxVisible = false;
|
||||
m_bVisCheckComplete = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < m_pHitboxCache->m_nNumHitboxes; i++) {
|
||||
bool vischeck = false;
|
||||
SAFE_CALL(vischeck = m_pHitboxCache->VisibilityCheck(i));
|
||||
if (vischeck) {
|
||||
m_bAnyHitboxVisible = true;
|
||||
m_bVisCheckComplete = true;
|
||||
gECP.StoreData(ECPN_VISCHECK, p_begin);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
gECP.StoreData(ECPN_VISCHECK, p_begin);
|
||||
m_bAnyHitboxVisible = false;
|
||||
m_bVisCheckComplete = true;
|
||||
|
||||
@ -257,67 +239,21 @@ EntityCache::~EntityCache() {
|
||||
delete [] m_pArray;
|
||||
}
|
||||
|
||||
void CachedEntity::PruneStrings() {
|
||||
m_nESPStrings = 0;
|
||||
}
|
||||
|
||||
void EntityCache::PruneStrings() {
|
||||
for (int i = 0; i < m_nMax && i < MAX_ENTITIES; i++) m_pArray[i].PruneStrings();
|
||||
}
|
||||
|
||||
void EntityCache::Update() {
|
||||
#if ENTITY_CACHE_PROFILER == true
|
||||
long p_begin = gECP.CurrentTime();
|
||||
#endif
|
||||
m_nMax = interfaces::entityList->GetHighestEntityIndex();
|
||||
for (int i = 0; i < m_nMax && i < MAX_ENTITIES; i++) {
|
||||
//logging::Info("Updating %i", i);
|
||||
m_pArray[i].Update(i);
|
||||
//logging::Info("Back!");
|
||||
}
|
||||
#if ENTITY_CACHE_PROFILER == true
|
||||
if (g_vEntityCacheProfiling->GetBool()) gECP.DoLog();
|
||||
#endif
|
||||
}
|
||||
|
||||
EntityCacheProfiling::EntityCacheProfiling() {
|
||||
m_DataAvg = new long[ECPNodes::ECPN_TOTAL];
|
||||
m_DataMax = new long[ECPNodes::ECPN_TOTAL];
|
||||
Reset();
|
||||
m_DataAvgAmount = 0;
|
||||
m_nLastLog = 0;
|
||||
}
|
||||
|
||||
EntityCacheProfiling::~EntityCacheProfiling() {
|
||||
delete [] m_DataAvg;
|
||||
delete [] m_DataMax;
|
||||
}
|
||||
|
||||
long EntityCacheProfiling::CurrentTime() {
|
||||
timespec ts;
|
||||
clock_gettime(CLOCK_REALTIME, &ts);
|
||||
return ts.tv_nsec;
|
||||
}
|
||||
|
||||
void EntityCacheProfiling::Reset() {
|
||||
for (int i = 0; i < ECPNodes::ECPN_TOTAL; i++) {
|
||||
m_DataAvg[i] = 0;
|
||||
m_DataMax[i] = 0;
|
||||
}
|
||||
m_nLastReset = CurrentTime();
|
||||
m_DataAvgAmount = 0;
|
||||
}
|
||||
|
||||
void EntityCacheProfiling::StoreData(int id, long begin) {
|
||||
m_DataAvg[id] = (m_DataAvg[id] + (CurrentTime() - begin)) / 2;
|
||||
if ((CurrentTime() - begin) > m_DataMax[id]) {
|
||||
m_DataMax[id] = (CurrentTime() - begin);
|
||||
}
|
||||
}
|
||||
|
||||
void EntityCacheProfiling::DoLog() {
|
||||
//if (CurrentTime() - m_nLastReset > 5000000000l) Reset();
|
||||
if (time(0) - m_nLastLog > 2) {
|
||||
logging::Info("[ECP] AVG: U:%lu (%.1f%%) | H:%lu (%.1f%%) | V:%lu (%.1f%%)",
|
||||
m_DataAvg[ECPNodes::ECPN_UPDATE], 100.0f * (float)((float)m_DataAvg[ECPNodes::ECPN_UPDATE] / (float)m_DataAvg[ECPNodes::ECPN_UPDATE]),
|
||||
m_DataAvg[ECPNodes::ECPN_HITBOX_UPDATE], 100.0f * (float)((float)m_DataAvg[ECPNodes::ECPN_HITBOX_UPDATE] / (float)m_DataAvg[ECPNodes::ECPN_UPDATE]),
|
||||
m_DataAvg[ECPNodes::ECPN_VISCHECK], 100.0f * (float)((float)m_DataAvg[ECPNodes::ECPN_VISCHECK] / (float)m_DataAvg[ECPNodes::ECPN_UPDATE])
|
||||
);
|
||||
logging::Info("[ECP] MAX: U:%lu | H:%lu | V:%lu", m_DataMax[ECPNodes::ECPN_UPDATE], m_DataMax[ECPNodes::ECPN_HITBOX_UPDATE], m_DataMax[ECPNodes::ECPN_UPDATE]);
|
||||
m_nLastLog = time(0);
|
||||
}
|
||||
}
|
||||
|
||||
CachedEntity* EntityCache::GetEntity(int idx) {
|
||||
@ -328,5 +264,4 @@ CachedEntity* EntityCache::GetEntity(int idx) {
|
||||
return &(m_pArray[idx]);
|
||||
}
|
||||
|
||||
EntityCacheProfiling gECP;
|
||||
EntityCache gEntityCache;
|
||||
|
@ -15,8 +15,6 @@
|
||||
|
||||
struct matrix3x4_t;
|
||||
|
||||
#define ENTITY_CACHE_PROFILER false
|
||||
|
||||
class IClientEntity;
|
||||
struct ESPStringCompound;
|
||||
struct player_info_s;
|
||||
@ -36,7 +34,7 @@ struct mstudiobbox_t;
|
||||
#define CE_VECTOR(entity, offset) CE_VAR(entity, offset, Vector)
|
||||
|
||||
#define CE_GOOD_NO_DORMANT_CHECK(entity) (!g_Settings.bInvalid && dynamic_cast<CachedEntity*>(entity) && dynamic_cast<IClientEntity*>(entity->m_pEntity))
|
||||
#define CE_GOOD(entity) (!g_Settings.bInvalid && dynamic_cast<CachedEntity*>(entity) && dynamic_cast<IClientEntity*>(entity->m_pEntity) && !entity->m_pEntity->IsDormant())
|
||||
#define CE_GOOD(entity) (!g_Settings.bInvalid && dynamic_cast<CachedEntity*>(entity) && dynamic_cast<IClientEntity*>(entity->m_pEntity) && entity->m_pEntity->GetIClientEntity() && !entity->m_pEntity->GetIClientEntity()->IsDormant())
|
||||
#define CE_BAD(entity) (!CE_GOOD(entity))
|
||||
|
||||
#define IDX_GOOD(idx) (idx >= 0 && idx < HIGHEST_ENTITY && idx < MAX_ENTITIES)
|
||||
@ -109,6 +107,7 @@ public:
|
||||
~CachedEntity();
|
||||
|
||||
void Update(int idx);
|
||||
void PruneStrings();
|
||||
void AddESPString(const char* string, ...);
|
||||
ESPStringCompound& GetESPString(int idx);
|
||||
|
||||
@ -168,6 +167,7 @@ public:
|
||||
~EntityCache();
|
||||
|
||||
void Update();
|
||||
void PruneStrings();
|
||||
void Invalidate();
|
||||
CachedEntity* GetEntity(int idx);
|
||||
|
||||
@ -175,35 +175,6 @@ public:
|
||||
int m_nMax;
|
||||
};
|
||||
|
||||
enum ECPNodes {
|
||||
ECPN_UPDATE,
|
||||
ECPN_HITBOX_UPDATE,
|
||||
ECPN_VISCHECK,
|
||||
ECPN_TOTAL
|
||||
};
|
||||
|
||||
class EntityCacheProfiling {
|
||||
public:
|
||||
EntityCacheProfiling();
|
||||
~EntityCacheProfiling();
|
||||
void Reset();
|
||||
long CurrentTime();
|
||||
void StoreData(int id, long time);
|
||||
void DoLog();
|
||||
long m_nLastReset;
|
||||
long m_nLastLog;
|
||||
long* m_DataAvg;
|
||||
long m_DataAvgAmount;
|
||||
long* m_DataMax;
|
||||
};
|
||||
|
||||
extern EntityCacheProfiling gECP;
|
||||
|
||||
extern EntityCache gEntityCache;
|
||||
|
||||
#if ENTITY_CACHE_PROFILER == true
|
||||
class CatVar;
|
||||
extern CatVar* g_vEntityCacheProfiling;
|
||||
#endif
|
||||
|
||||
#endif /* ENTITYCACHE_H_ */
|
||||
|
@ -24,7 +24,7 @@ void GlobalSettings::Init() {
|
||||
EstimateAbsVelocity = (EstimateAbsVelocity_t*)gSignatures.GetClientSignature("55 89 E5 56 53 83 EC 30 8B 5D 08 8B 75 0C E8 4D 2E 01 00 39 D8 74 69 0F B6 05 24 3F 00 02 81 C3 B8 02 00 00 C6 05 24 3F 00 02 01 88 45 F0 A1 20 3F 00 02 89 45 F4 A1 28 3F 00 02 89 45 EC 8D 45 EC A3 28 3F 00 02 A1 14 C8 F6 01 8B 40 0C 89 74 24 04 89 1C 24 89 44 24 08 E8 A2 41 00 00 0F B6 45 F0 A2 24 3F 00 02 8B 45 F4 A3 20 3F 00 02 8B 45 EC A3 28 3F 00 02 83 C4 30 5B 5E 5D C3");
|
||||
|
||||
this->sDisconnectMsg = new CatVar(CV_STRING, "disconnect_msg", "", "Disconnect reason", NULL, "A custom disconnect message");
|
||||
|
||||
this->bFastVischeck = new CatVar(CV_SWITCH, "fast_vischeck", "1", "Fast VisCheck", NULL, "VisChecks only certain hitboxes");
|
||||
// this->bMaxPerformance = CREATE_CV(CV_SWITCH, "optimize_performance", "0", "deprecated");
|
||||
this->bHackEnabled = new CatVar(CV_SWITCH, "enabled", "1", "CatHook enabled", NULL, "Master Hack Switch");
|
||||
this->bIgnoreTaunting = new CatVar(CV_SWITCH, "ignore_taunting", "1", "Ignore taunting", NULL, "Aimbot/Triggerbot won't attack taunting enemies");
|
||||
@ -41,7 +41,9 @@ void GlobalSettings::Init() {
|
||||
this->bNoVisuals = new CatVar(CV_SWITCH, "novisuals", "0", "Disable visuals", NULL, "Disable all visuals");
|
||||
this->bCleanScreenshots = new CatVar(CV_SWITCH, "clean_screenshot", "1", "Clean screenshots", NULL, "Clean screenshots");
|
||||
this->bDebugLog = new CatVar(CV_SWITCH, "log", "1", "Debug Log", NULL, "Disable this if you don't need cathook messages in your console");
|
||||
this->bThirdperson->m_pConVar->InstallChangeCallback(ThirdpersonCallback);
|
||||
this->bThirdperson->OnRegister([](CatVar* var) {
|
||||
var->convar->InstallChangeCallback(ThirdpersonCallback);
|
||||
});
|
||||
this->bFastOutline = new CatVar(CV_SWITCH, "fastoutline", "0", "Low quality outline", NULL, "Might increase performance when there is a lot of ESP text to draw");
|
||||
this->kRollSpeedhack = new CatVar(CV_KEY, "rollspeedhack", "0", "Roll Speedhack", NULL, "Roll speedhack key");
|
||||
bInvalid = true;
|
||||
|
@ -42,6 +42,7 @@ public:
|
||||
Vector last_angles;
|
||||
CatVar* bFastOutline;
|
||||
CatVar* kRollSpeedhack;
|
||||
CatVar* bFastVischeck;
|
||||
bool bInvalid;
|
||||
};
|
||||
|
||||
|
@ -18,16 +18,16 @@
|
||||
#include "../common.h"
|
||||
#include "../sdk.h"
|
||||
|
||||
CCVarContainer::CCVarContainer(IWidget* parent, CatVar* var) : CBaseContainer(("cvc_" + std::string(var->m_pConVar->GetName())), parent) {
|
||||
CCVarContainer::CCVarContainer(IWidget* parent, CatVar* var) : CBaseContainer("cvc_" + var->name, parent) {
|
||||
m_pVar = var;
|
||||
m_pInput = 0;
|
||||
m_pLabel = new CTextLabel(GetName() + "_desc", this, std::string(var->m_pConVar->GetHelpText()));
|
||||
m_pLabel = new CTextLabel(GetName() + "_desc", this, var->desc_short);
|
||||
m_pControl = 0;
|
||||
if (var->Description().length()) {
|
||||
Props()->SetString("tooltip", var->Description().c_str());
|
||||
if (var->desc_short.length()) {
|
||||
Props()->SetString("tooltip", var->desc_short.c_str());
|
||||
}
|
||||
bool needsinput = false;
|
||||
switch (var->GetType()) {
|
||||
switch (var->type) {
|
||||
case CatVar_t::CV_SWITCH: {// Label, Checkbox
|
||||
CCheckbox* cb = new CCheckbox(GetName() + "_control", this, var->GetBool());
|
||||
cb->SetCallback([this](CCheckbox*, bool value) {
|
||||
@ -37,19 +37,19 @@ CCVarContainer::CCVarContainer(IWidget* parent, CatVar* var) : CBaseContainer(("
|
||||
} break;
|
||||
case CatVar_t::CV_ENUM: { // Most difficult thing, dropdown menu
|
||||
CDropdown* dd = new CDropdown(GetName() + "_control", this);
|
||||
for (int i = var->GetEnum()->Minimum(); i <= var->GetEnum()->Maximum(); i++) {
|
||||
dd->AddValue(var->GetEnum()->Name(i));
|
||||
for (int i = var->enum_type->Minimum(); i <= var->enum_type->Maximum(); i++) {
|
||||
dd->AddValue(var->enum_type->Name(i));
|
||||
}
|
||||
dd->SetCallback([this](CDropdown*, int value) {
|
||||
m_pVar->SetValue(value);
|
||||
});
|
||||
dd->Props()->SetInt("offset", var->GetEnum()->Minimum());
|
||||
dd->Props()->SetInt("offset", var->enum_type->Minimum());
|
||||
m_pControl = dd;
|
||||
} break;
|
||||
case CatVar_t::CV_FLOAT: {
|
||||
if (var->m_bHasMinmax) {
|
||||
if (var->restricted) {
|
||||
CSlider* sl = new CSlider(GetName() + "_control", this);
|
||||
sl->Setup(var->m_flMinValue, var->m_flMaxValue);
|
||||
sl->Setup(var->min, var->max);
|
||||
sl->SetValue(var->GetFloat());
|
||||
m_pControl = sl;
|
||||
sl->SetCallback([this](CSlider*, float oldv, float newv) {
|
||||
@ -59,9 +59,9 @@ CCVarContainer::CCVarContainer(IWidget* parent, CatVar* var) : CBaseContainer(("
|
||||
needsinput = true;
|
||||
} break;
|
||||
case CatVar_t::CV_INT: {
|
||||
if (var->m_bHasMinmax) {
|
||||
if (var->restricted) {
|
||||
CSlider* sl = new CSlider(GetName() + "_control", this);
|
||||
sl->Setup(var->m_flMinValue, var->m_flMaxValue);
|
||||
sl->Setup(var->min, var->max);
|
||||
sl->SetStep(1.0f);
|
||||
sl->SetValue(var->GetInt());
|
||||
sl->SetCallback([this](CSlider*, float oldv, float newv) {
|
||||
@ -88,7 +88,7 @@ CCVarContainer::CCVarContainer(IWidget* parent, CatVar* var) : CBaseContainer(("
|
||||
m_pInput = new CTextInput(GetName() + "_input", this);
|
||||
m_pInput->SetValue(std::string(var->GetString()));
|
||||
m_pInput->SetCallback([this](CTextInput*, std::string old, std::string newv) {
|
||||
if (m_pVar->GetType() == CV_STRING) {
|
||||
if (m_pVar->type == CV_STRING) {
|
||||
m_pVar->SetValue(newv);
|
||||
} else {
|
||||
try {
|
||||
@ -148,7 +148,7 @@ void CCVarContainer::Update() {
|
||||
if (!m_pInput->IsFocused()) m_pInput->SetValue(m_pVar->GetString());
|
||||
}
|
||||
if (m_pControl && !m_pControl->IsFocused()) {
|
||||
switch (m_pVar->GetType()) {
|
||||
switch (m_pVar->type) {
|
||||
case CatVar_t::CV_ENUM: {
|
||||
dynamic_cast<CDropdown*>(m_pControl)->SetValue(m_pVar->GetInt());
|
||||
} break;
|
||||
|
@ -31,7 +31,7 @@ void CMenuWindow::AddElements() {
|
||||
tab->AddChild(new CCVarContainer(tab, g_phAimbot->v_bEnabled));
|
||||
tab->AddChild(new CCVarContainer(tab, g_phAimbot->v_bAimAtTeammates));
|
||||
if (TF) tab->AddChild(new CCVarContainer(tab, g_phAimbot->v_bAimBuildings));
|
||||
tab->AddChild(new CCVarContainer(tab, g_phAimbot->v_bAutoHitbox));
|
||||
tab->AddChild(new CCVarContainer(tab, g_phAimbot->v_eHitboxMode));
|
||||
tab->AddChild(new CCVarContainer(tab, g_phAimbot->v_bAutoShoot));
|
||||
tab->AddChild(new CCVarContainer(tab, g_phAimbot->v_bActiveOnlyWhenCanShoot));
|
||||
tab->AddChild(new CCVarContainer(tab, g_phAimbot->v_bEnabledAttacking));
|
||||
@ -51,7 +51,7 @@ void CMenuWindow::AddElements() {
|
||||
tab->AddChild(new CCVarContainer(tab, g_phAimbot->v_fOverrideProjSpeed));
|
||||
//tab->AddChild(new CCVarContainer(tab, g_phAimbot->v_iMaxAutoshootRange));
|
||||
tab->AddChild(new CCVarContainer(tab, g_phAimbot->v_iMaxRange));
|
||||
tab->AddChild(new CCVarContainer(tab, g_phAimbot->v_iSeenDelay));
|
||||
//tab->AddChild(new CCVarContainer(tab, g_phAimbot->v_iSeenDelay));
|
||||
tab->AddChild(new CCVarContainer(tab, g_phAimbot->v_kAimKey));
|
||||
AddTab("esp", "ESP");
|
||||
tab = GetTab("esp");
|
||||
@ -62,7 +62,7 @@ void CMenuWindow::AddElements() {
|
||||
ADDCVAR(g_phESP->v_bBox);
|
||||
ADDCVAR(g_phESP->v_bTeammates);
|
||||
ADDCVAR(g_phESP->v_bLegit);
|
||||
ADDCVAR(g_phESP->v_iLegitSeenTicks);
|
||||
//ADDCVAR(g_phESP->v_iLegitSeenTicks);
|
||||
ADDCVAR(g_phESP->v_bShowHealthNumbers);
|
||||
ADDCVAR(g_phESP->v_bShowName);
|
||||
if (TF) ADDCVAR(g_phESP->v_bShowClass);
|
||||
|
@ -39,7 +39,9 @@ CatGUI::~CatGUI() {
|
||||
void CatGUI::Setup() {
|
||||
m_pRootWindow = new RootWindow();
|
||||
m_pRootWindow->Setup();
|
||||
v_bGUIVisible->m_pConVar->InstallChangeCallback(GUIVisibleCallback);
|
||||
v_bGUIVisible->OnRegister([](CatVar* var) {
|
||||
var->convar->InstallChangeCallback(GUIVisibleCallback);
|
||||
});
|
||||
}
|
||||
|
||||
void CatGUI::ShowTooltip(std::string text) {
|
||||
|
@ -33,7 +33,6 @@
|
||||
#include "sharedobj.h"
|
||||
#include "hooks.h"
|
||||
#include "netmessage.h"
|
||||
#include "targeting/ITargetSystem.h"
|
||||
#include "profiler.h"
|
||||
#include "gui/GUI.h"
|
||||
//#include "gui/controls.h"
|
||||
@ -141,8 +140,8 @@ void hack::Initialize() {
|
||||
hack::InitHacks();
|
||||
g_Settings.Init();
|
||||
g_pGUI = new CatGUI();
|
||||
g_pGUI->Setup();
|
||||
EndConVars();
|
||||
g_pGUI->Setup();
|
||||
gNetvars.init();
|
||||
InitNetVars();
|
||||
g_pLocalPlayer = new LocalPlayer();
|
||||
|
@ -12,7 +12,7 @@
|
||||
g_ph##x = new x()
|
||||
|
||||
#define HACK_PROCESS_USERCMD(x, y) \
|
||||
g_ph##x->ProcessUserCmd(y)
|
||||
{ PROF_SECTION(x); g_ph##x->ProcessUserCmd(y); }
|
||||
|
||||
#define HACK_DRAW(x) \
|
||||
g_ph##x->Draw()
|
||||
|
@ -9,11 +9,6 @@
|
||||
#include "../trace.h"
|
||||
#include "../targethelper.h"
|
||||
|
||||
#include "../targeting/ITargetSystem.h"
|
||||
#include "../targeting/TargetSystemSmart.h"
|
||||
#include "../targeting/TargetSystemFOV.h"
|
||||
#include "../targeting/TargetSystemDistance.h"
|
||||
|
||||
#include "../sdk.h"
|
||||
#include "../sdk/in_buttons.h"
|
||||
#include "Aimbot.h"
|
||||
@ -27,12 +22,7 @@ enum TargetSystem_t {
|
||||
DISTANCE = 2
|
||||
};
|
||||
|
||||
ITargetSystem* target_systems[3];
|
||||
|
||||
Aimbot::Aimbot() {
|
||||
target_systems[0] = new TargetSystemSmart();
|
||||
target_systems[1] = new TargetSystemFOV();
|
||||
target_systems[2] = new TargetSystemDistance();
|
||||
m_bAimKeySwitch = false;
|
||||
this->v_eAimKeyMode = new CatVar(CV_ENUM, "aimbot_aimkey_mode", "1", "Aimkey mode", new CatEnum({ "DISABLED", "AIMKEY", "REVERSE", "TOGGLE" }),
|
||||
"DISABLED: aimbot is always active\nAIMKEY: aimbot is active when key is down\nREVERSE: aimbot is disabled when key is down\nTOGGLE: pressing key toggles aimbot", false);
|
||||
@ -43,11 +33,14 @@ Aimbot::Aimbot() {
|
||||
"HAND L", "UPPER ARM R", "LOWER ARM R", "HAND R", "HIP L", "KNEE L", "FOOT L", "HIP R",
|
||||
"KNEE R", "FOOT R" }),
|
||||
"Hitbox to aim at. Ignored if AutoHitbox is on");
|
||||
this->v_bAutoHitbox = new CatVar(CV_SWITCH, "aimbot_autohitbox", "1", "Autohitbox", NULL,
|
||||
/*this->v_bAutoHitbox = new CatVar(CV_SWITCH, "aimbot_autohitbox", "1", "Autohitbox", NULL,
|
||||
"Automatically decide the hitbox to aim at.\n"
|
||||
"For example: Sniper rifles and Ambassador always aim at head, "
|
||||
"rocket launchers aim at feet if enemy is standing and at body "
|
||||
"if enemy is midair for easy airshots");
|
||||
"if enemy is midair for easy airshots");*/
|
||||
this->v_eHitboxMode = new CatVar(CV_ENUM, "aimbot_hitboxmode", "0", "Hitbox Mode", new CatEnum({
|
||||
"AUTO-HEAD", "AUTO-CLOSEST", "STATIC"
|
||||
}), "Defines hitbox selection mode");
|
||||
this->v_bInterpolation = new CatVar(CV_SWITCH, "aimbot_interp", "1", "Latency interpolation", NULL,
|
||||
"Enable basic latency interpolation");
|
||||
this->v_bAutoShoot = new CatVar(CV_SWITCH, "aimbot_autoshoot", "1", "Autoshoot", NULL,
|
||||
@ -97,8 +90,8 @@ Aimbot::Aimbot() {
|
||||
"Aimbot only activates when you can instantly shoot, sometimes making the autoshoot invisible for spectators");
|
||||
//v_fSmoothAutoshootTreshold = new CatVar(CV_FLOAT, "aimbot_smooth_autoshoot_treshold", "0.01", "Smooth autoshoot");
|
||||
//this->v_fSmoothRandomness = CREATE_CV(CV_FLOAT, "aimbot_smooth_randomness", "1.0", "Smooth randomness");
|
||||
this->v_iSeenDelay = new CatVar(CV_INT, "aimbot_delay", "0", "Aimbot delay", NULL,
|
||||
"# of ticks that should've passed since you can see any hitbox of enemy before aimbot will aim at them", true, 300.0f);
|
||||
// this->v_iSeenDelay = new CatVar(CV_INT, "aimbot_delay", "0", "Aimbot delay", NULL,
|
||||
// "# of ticks that should've passed since you can see any hitbox of enemy before aimbot will aim at them", true, 300.0f);
|
||||
this->v_bProjPredVisibility = new CatVar(CV_SWITCH, "aimbot_proj_vispred", "0", "Projectile visibility prediction", NULL,
|
||||
"If disabled, aimbot won't lock at enemies that are behind walls, but will come out soon");
|
||||
this->v_bProjPredFOV = new CatVar(CV_SWITCH, "aimbot_proj_fovpred", "0", "Projectile FOV mode", NULL,
|
||||
@ -162,6 +155,9 @@ bool Aimbot::ShouldAim(CUserCmd* cmd) {
|
||||
if (!CanHeadshot()) return false;
|
||||
}
|
||||
}
|
||||
if (g_phMisc->v_bCritHack->GetBool()) {
|
||||
if (RandomCrits() && WeaponCanCrit() && !IsAttackACrit(cmd)) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -169,7 +165,7 @@ void Aimbot::ProcessUserCmd(CUserCmd* cmd) {
|
||||
if (!this->v_bEnabled->GetBool()) return;
|
||||
if (CE_BAD(g_pLocalPlayer->entity) || CE_BAD(g_pLocalPlayer->weapon())) return;
|
||||
if (g_pLocalPlayer->life_state) return;
|
||||
//this->m_iLastTarget = -1;
|
||||
//this->m_iLastTarget = -1
|
||||
|
||||
if (HasCondition(g_pLocalPlayer->entity, TFCond_Taunting)) return;
|
||||
|
||||
@ -196,25 +192,6 @@ void Aimbot::ProcessUserCmd(CUserCmd* cmd) {
|
||||
m_bHeadOnly = false;
|
||||
|
||||
m_iPreferredHitbox = this->v_eHitbox->GetInt();
|
||||
if (this->v_bAutoHitbox->GetBool()) {
|
||||
int ci = g_pLocalPlayer->weapon()->m_iClassID;
|
||||
if (ci == g_pClassID->CTFSniperRifle ||
|
||||
ci == g_pClassID->CTFSniperRifleDecap) {
|
||||
m_bHeadOnly = CanHeadshot();
|
||||
} else if (ci == g_pClassID->CTFCompoundBow) {
|
||||
m_bHeadOnly = true;
|
||||
} else if (ci == g_pClassID->CTFRevolver) {
|
||||
m_bHeadOnly = IsAmbassador(g_pLocalPlayer->weapon());
|
||||
} else if (ci == g_pClassID->CTFRocketLauncher ||
|
||||
ci == g_pClassID->CTFRocketLauncher_AirStrike ||
|
||||
ci == g_pClassID->CTFRocketLauncher_DirectHit ||
|
||||
ci == g_pClassID->CTFRocketLauncher_Mortar) {
|
||||
m_iPreferredHitbox = hitbox_t::foot_L;
|
||||
} else {
|
||||
m_iPreferredHitbox = hitbox_t::pelvis;
|
||||
}
|
||||
}
|
||||
|
||||
if (g_pLocalPlayer->weapon()->m_iClassID == g_pClassID->CTFGrapplingHook) return;
|
||||
|
||||
m_bProjectileMode = (GetProjectileData(g_pLocalPlayer->weapon(), m_flProjSpeed, m_flProjGravity));
|
||||
@ -320,22 +297,67 @@ void Aimbot::ProcessUserCmd(CUserCmd* cmd) {
|
||||
if (this->v_bSilent->GetBool()) g_pLocalPlayer->bUseSilentAngles = true;
|
||||
return;
|
||||
}
|
||||
|
||||
int Aimbot::BestHitbox(CachedEntity* target, int preferred) {
|
||||
if (!v_bAutoHitbox->GetBool()) return preferred;
|
||||
if (m_bHeadOnly) return hitbox_t::head;
|
||||
int flags = CE_INT(target, netvar.iFlags);
|
||||
bool ground = (flags & (1 << 0));
|
||||
if (!ground) {
|
||||
if (GetWeaponMode(g_pLocalPlayer->entity) == weaponmode::weapon_projectile) {
|
||||
if (g_pLocalPlayer->weapon()->m_iClassID != g_pClassID->CTFCompoundBow) {
|
||||
preferred = hitbox_t::spine_3;
|
||||
}
|
||||
// FIXME move
|
||||
int ClosestHitbox(CachedEntity* target) {
|
||||
int closest = -1;
|
||||
float closest_fov = 256;
|
||||
for (int i = 0; i < target->m_pHitboxCache->GetNumHitboxes(); i++) {
|
||||
float fov = GetFov(g_pLocalPlayer->v_OrigViewangles, g_pLocalPlayer->v_Eye, target->m_pHitboxCache->GetHitbox(i)->center);
|
||||
if (fov < closest_fov || closest == -1) {
|
||||
closest = i;
|
||||
closest_fov = fov;
|
||||
}
|
||||
}
|
||||
if (target->m_pHitboxCache->VisibilityCheck(preferred)) return preferred;
|
||||
for (int i = m_bProjectileMode ? 1 : 0; i < target->m_pHitboxCache->GetNumHitboxes(); i++) {
|
||||
if (target->m_pHitboxCache->VisibilityCheck(i)) return i;
|
||||
return closest;
|
||||
}
|
||||
|
||||
int Aimbot::BestHitbox(CachedEntity* target, int preferred) {
|
||||
switch (v_eHitboxMode->GetInt()) {
|
||||
case 0: { // AUTO-HEAD
|
||||
int ci = g_pLocalPlayer->weapon()->m_iClassID;
|
||||
if (ci == g_pClassID->CTFSniperRifle ||
|
||||
ci == g_pClassID->CTFSniperRifleDecap) {
|
||||
m_bHeadOnly = CanHeadshot();
|
||||
} else if (ci == g_pClassID->CTFCompoundBow) {
|
||||
m_bHeadOnly = true;
|
||||
} else if (ci == g_pClassID->CTFRevolver) {
|
||||
m_bHeadOnly = IsAmbassador(g_pLocalPlayer->weapon());
|
||||
} else if (ci == g_pClassID->CTFRocketLauncher ||
|
||||
ci == g_pClassID->CTFRocketLauncher_AirStrike ||
|
||||
ci == g_pClassID->CTFRocketLauncher_DirectHit ||
|
||||
ci == g_pClassID->CTFRocketLauncher_Mortar) {
|
||||
preferred = hitbox_t::foot_L;
|
||||
} else {
|
||||
preferred = hitbox_t::pelvis;
|
||||
}
|
||||
int flags = CE_INT(target, netvar.iFlags);
|
||||
bool ground = (flags & (1 << 0));
|
||||
if (!ground) {
|
||||
if (GetWeaponMode(g_pLocalPlayer->entity) == weaponmode::weapon_projectile) {
|
||||
if (g_pLocalPlayer->weapon()->m_iClassID != g_pClassID->CTFCompoundBow) {
|
||||
preferred = hitbox_t::spine_3;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (LOCAL_W->m_iClassID == g_pClassID->CTFSniperRifle || LOCAL_W->m_iClassID == g_pClassID->CTFSniperRifleDecap) {
|
||||
float cdmg = CE_FLOAT(LOCAL_W, netvar.flChargedDamage);
|
||||
if (CanHeadshot() && cdmg > target->m_iHealth) {
|
||||
preferred = ClosestHitbox(target);
|
||||
m_bHeadOnly = false;
|
||||
}
|
||||
}
|
||||
if (m_bHeadOnly) return hitbox_t::head;
|
||||
if (target->m_pHitboxCache->VisibilityCheck(preferred)) return preferred;
|
||||
for (int i = m_bProjectileMode ? 1 : 0; i < target->m_pHitboxCache->GetNumHitboxes(); i++) {
|
||||
if (target->m_pHitboxCache->VisibilityCheck(i)) return i;
|
||||
}
|
||||
} break;
|
||||
case 1: { // AUTO-CLOSEST
|
||||
return ClosestHitbox(target);
|
||||
} break;
|
||||
case 2: { // STATIC
|
||||
return v_eHitbox->GetInt();;
|
||||
} break;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@ -355,7 +377,7 @@ int Aimbot::ShouldTarget(CachedEntity* entity) {
|
||||
#if NO_DEVIGNORE != true
|
||||
if (Developer(entity)) return 2; // TODO developer relation
|
||||
#endif
|
||||
if (entity->m_lSeenTicks < (unsigned)this->v_iSeenDelay->GetInt()) return 3;
|
||||
//if (entity->m_lSeenTicks < (unsigned)this->v_iSeenDelay->GetInt()) return 3;
|
||||
if (!entity->m_bAlivePlayer) return 5;
|
||||
if (!entity->m_bEnemy && !v_bAimAtTeammates->GetBool()) return 7;
|
||||
if (v_iMaxRange->GetInt() > 0) {
|
||||
@ -367,7 +389,7 @@ int Aimbot::ShouldTarget(CachedEntity* entity) {
|
||||
if (GetRelation(entity) == relation::FRIEND) return 11;
|
||||
Vector resultAim;
|
||||
int hitbox = BestHitbox(entity, m_iPreferredHitbox);
|
||||
if (m_bHeadOnly && hitbox) return 12;
|
||||
//if (m_bHeadOnly && hitbox) return 12;
|
||||
if (m_bProjectileMode) {
|
||||
if (v_bProjPredFOV->GetBool()) {
|
||||
if (v_bProjPredVisibility->GetBool()) {
|
||||
|
@ -52,14 +52,15 @@ public:
|
||||
|
||||
CatVar* v_kAimKey;
|
||||
CatVar* v_eAimKeyMode;
|
||||
CatVar* v_eHitboxMode;
|
||||
//CatVar* v_bSmooth;
|
||||
//CatVar* v_fSmoothValue;
|
||||
//CatVar* v_bDebug;
|
||||
CatVar* v_bEnabled;
|
||||
CatVar* v_fFOV;
|
||||
CatVar* v_eHitbox;
|
||||
CatVar* v_bAutoHitbox;
|
||||
CatVar* v_iSeenDelay;
|
||||
// CatVar* v_bAutoHitbox;
|
||||
// CatVar* v_iSeenDelay;
|
||||
CatVar* v_bInterpolation;
|
||||
CatVar* v_bAutoShoot;
|
||||
CatVar* v_bSilent;
|
||||
|
@ -36,6 +36,7 @@ void AntiAim::ProcessUserCmd(CUserCmd* cmd) {
|
||||
if (cmd->buttons & IN_USE) {
|
||||
return;
|
||||
}
|
||||
if (CE_BAD(LOCAL_W)) return;
|
||||
|
||||
if ((cmd->buttons & IN_ATTACK) && (LOCAL_W->m_iClassID != g_pClassID->CTFCompoundBow)) {
|
||||
if (CanShoot()) return;
|
||||
|
@ -45,7 +45,7 @@ ESP::ESP() {
|
||||
this->v_bShowFriends = new CatVar(CV_SWITCH, "esp_friends", "1", "Show friends", NULL, "Always show friends");
|
||||
this->v_bVisCheck = new CatVar(CV_SWITCH, "esp_vischeck", "1", "VisCheck", NULL, "ESP visibility check - makes enemy info behind walls darker, disable this if you get FPS drops");
|
||||
this->v_bLegit = new CatVar(CV_SWITCH, "esp_legit", "0", "Legit Mode", NULL, "Don't show invisible enemies");
|
||||
this->v_iLegitSeenTicks = new CatVar(CV_INT, "esp_legit_seenticks", "150", "Legit delay", NULL, "Delay after enemy gone behind a wall where you can still see them", true, 200.0);
|
||||
// this->v_iLegitSeenTicks = new CatVar(CV_INT, "esp_legit_seenticks", "150", "Legit delay", NULL, "Delay after enemy gone behind a wall where you can still see them", true, 200.0);
|
||||
v_bShowDroppedWeapons = new CatVar(CV_SWITCH, "esp_item_weapons", "0", "Dropped weapons", NULL, "Show dropped weapons");
|
||||
v_bShowAmmoPacks = new CatVar(CV_SWITCH, "esp_item_ammo", "0", "Ammo packs", NULL, "Show ammo packs");
|
||||
v_bShowHealthPacks = new CatVar(CV_SWITCH, "esp_item_health", "1", "Health packs", NULL, "Show health packs");
|
||||
@ -130,9 +130,9 @@ void ESP::ProcessEntityPT(CachedEntity* ent) {
|
||||
bool cloak = IsPlayerInvisible(ent);
|
||||
if (v_bLegit->GetBool() && ent->m_iTeam != g_pLocalPlayer->team && !GetRelation(ent)) {
|
||||
if (cloak) return;
|
||||
if (ent->m_lLastSeen > v_iLegitSeenTicks->GetInt()) {
|
||||
/*if (ent->m_lLastSeen > v_iLegitSeenTicks->GetInt()) {
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
if (!ent->m_bEnemy && !v_bTeammates->GetBool() && !GetRelation(ent)) break;
|
||||
if (!ent->m_bAlivePlayer) break;
|
||||
@ -142,9 +142,9 @@ void ESP::ProcessEntityPT(CachedEntity* ent) {
|
||||
}
|
||||
case ENTITY_BUILDING: {
|
||||
if (v_bLegit->GetBool() && ent->m_iTeam != g_pLocalPlayer->team) {
|
||||
if (ent->m_lLastSeen > v_iLegitSeenTicks->GetInt()) {
|
||||
/*if (ent->m_lLastSeen > v_iLegitSeenTicks->GetInt()) {
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
if (CE_INT(ent, netvar.iTeamNum) == g_pLocalPlayer->team && !v_bTeammates->GetBool()) break;
|
||||
DrawBox(ent, fg, 1.0f, 0.0f, true, CE_INT(ent, netvar.iBuildingHealth), CE_INT(ent, netvar.iBuildingMaxHealth));
|
||||
@ -279,9 +279,9 @@ void ESP::ProcessEntity(CachedEntity* ent) {
|
||||
int level = CE_INT(ent, netvar.iUpgradeLevel);
|
||||
const char* name = (ent->m_iClassID == g_pClassID->CObjectTeleporter ? "Teleporter" : (ent->m_iClassID == g_pClassID->CObjectSentrygun ? "Sentry Gun" : "Dispenser"));
|
||||
if (v_bLegit->GetBool() && ent->m_iTeam != g_pLocalPlayer->team) {
|
||||
if (ent->m_lLastSeen > v_iLegitSeenTicks->GetInt()) {
|
||||
/*if (ent->m_lLastSeen > v_iLegitSeenTicks->GetInt()) {
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
ent->AddESPString("LV %i %s", level, name);
|
||||
if (this->v_bShowHealthNumbers->GetBool()) {
|
||||
@ -308,9 +308,9 @@ void ESP::ProcessEntity(CachedEntity* ent) {
|
||||
// only if bTeammatePowerup or bTeammates is true
|
||||
if (v_bLegit->GetBool() && ent->m_iTeam != g_pLocalPlayer->team && !GetRelation(ent)) {
|
||||
if (IsPlayerInvisible(ent)) return;
|
||||
if (ent->m_lLastSeen > (unsigned)v_iLegitSeenTicks->GetInt()) {
|
||||
/*if (ent->m_lLastSeen > (unsigned)v_iLegitSeenTicks->GetInt()) {
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
if (power >= 0 && (ent->m_bEnemy || this->v_bTeammatePowerup->GetBool() || this->v_bTeammates->GetBool())) {
|
||||
ent->AddESPString("HAS [%s]", powerups[power]);
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
CatVar* v_bVisCheck;
|
||||
CatVar* v_bLegit;
|
||||
CatVar* v_bShowHealthNumbers;
|
||||
CatVar* v_iLegitSeenTicks;
|
||||
// CatVar* v_iLegitSeenTicks;
|
||||
CatVar* v_iShowRockets;
|
||||
CatVar* v_iShowArrows;
|
||||
CatVar* v_iShowPipes;
|
||||
|
@ -78,7 +78,7 @@ KillSay::~KillSay() {
|
||||
}
|
||||
|
||||
void KillSay::Reload() {
|
||||
m_TextFile->LoadFile(v_sFileName->m_pConVar->GetString());
|
||||
m_TextFile->LoadFile(v_sFileName->GetString());
|
||||
}
|
||||
|
||||
void CC_KillSay_ReloadFile(const CCommand& args) {
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include "../hack.h"
|
||||
#include "../common.h"
|
||||
#include "../sdk.h"
|
||||
#include <checksum_md5.h>
|
||||
#include "../hooks/hookedmethods.h"
|
||||
#include "../netmessage.h"
|
||||
#include "../copypasted/CSignature.h"
|
||||
@ -411,112 +410,13 @@ void Misc::ProcessUserCmd(CUserCmd* cmd) {
|
||||
*/
|
||||
if (TF2C && v_bTauntSlide->GetBool())
|
||||
RemoveCondition(LOCAL_E, TFCond_Taunting);
|
||||
|
||||
static ConVar* criticals = interfaces::cvar->FindVar("tf_weapon_criticals");
|
||||
bool crit = false;
|
||||
if (CE_GOOD(LOCAL_W) && TF && criticals->GetBool()) {
|
||||
IClientEntity* weapon = RAW_ENT(LOCAL_W);
|
||||
if (TF2C) {
|
||||
if (vfunc<bool(*)(IClientEntity*)>(weapon, 1824 / 4, 0)(weapon)) {
|
||||
static uintptr_t CalcIsAttackCritical_s = gSignatures.GetClientSignature("55 89 E5 56 53 83 EC 10 8B 5D 08 89 1C 24 E8 ? ? ? ? 85 C0 89 C6 74 59 8B 00 89 34 24 FF 90 E0 02 00 00 84 C0 74 4A A1 ? ? ? ? 8B 40 04 3B 83 A8 09 00 00 74 3A");
|
||||
typedef void(*CalcIsAttackCritical_t)(IClientEntity*);
|
||||
CalcIsAttackCritical_t CIACFn = (CalcIsAttackCritical_t)(CalcIsAttackCritical_s);
|
||||
*(float*)((uintptr_t)weapon + 2468ul) = 0.0f;
|
||||
int tries = 0;
|
||||
static int lcmdn = 0;
|
||||
crit = *(bool*)((uintptr_t)RAW_ENT(LOCAL_W) + 2454ul);
|
||||
static int& seed = *(int*)(sharedobj::client->lmap->l_addr + 0x00D53F68ul);
|
||||
bool cmds = false;
|
||||
seed = MD5_PseudoRandom(cmd->command_number) & 0x7fffffff;
|
||||
RandomSeed(seed);
|
||||
CIACFn(RAW_ENT(LOCAL_W));
|
||||
crit = *(bool*)((uintptr_t)RAW_ENT(LOCAL_W) + 2454ul);
|
||||
/*while (!crit && (tries < 200)) {
|
||||
*(int*)(weapon + 2472) = 0;
|
||||
seed = MD5_PseudoRandom(++lcmdn) & 0x7fffffff;
|
||||
tries++;
|
||||
RandomSeed(seed);
|
||||
CIACFn(RAW_ENT(LOCAL_W));
|
||||
crit = *(bool*)((uintptr_t)RAW_ENT(LOCAL_W) + 2454ul);
|
||||
cmds = true;
|
||||
}*/
|
||||
//logging::Info("Seed: %i", seed);
|
||||
/*while (!crit && tries < 50) {
|
||||
tries++;
|
||||
//crit = (vfunc<bool(*)(IClientEntity*)>(RAW_ENT(LOCAL_W), 1764 / 4, 0))(RAW_ENT(LOCAL_W));
|
||||
}*/
|
||||
}
|
||||
} else if (TF2) {
|
||||
if (vfunc<bool(*)(IClientEntity*)>(weapon, 1944 / 4, 0)(weapon)) {
|
||||
static uintptr_t CalcIsAttackCritical_s = gSignatures.GetClientSignature("55 89 E5 83 EC 28 89 5D F4 8B 5D 08 89 75 F8 89 7D FC 89 1C 24 E8 ? ? ? ? 85 C0 89 C6 74 60 8B 00 89 34 24 FF 90 E0 02 00 00 84 C0 74 51 A1 ? ? ? ? 8B 40 04");
|
||||
typedef void(*CalcIsAttackCritical_t)(IClientEntity*);
|
||||
CalcIsAttackCritical_t CIACFn = (CalcIsAttackCritical_t)(CalcIsAttackCritical_s);
|
||||
//*(float*)((uintptr_t)weapon + 2468ul) = 0.0f;
|
||||
//bool crit = *(bool*)((uintptr_t)RAW_ENT(LOCAL_W) + 2830ul);
|
||||
if (cmd->command_number) {
|
||||
int tries = 0;
|
||||
static int cmdn = 0;
|
||||
crit = false;
|
||||
bool chc = false;
|
||||
if (false) {
|
||||
while (!crit && (tries < 4000)) {
|
||||
cmdn++;
|
||||
tries++;
|
||||
int md5seed = MD5_PseudoRandom(cmdn) & 0x7fffffff;
|
||||
int rseed = md5seed;//*(int*)(weapon + 52ul);
|
||||
int& a = *(int*)((uintptr_t)(sharedobj::client->lmap->l_addr) + 0x1F6D4A8);
|
||||
a = md5seed;
|
||||
int c = LOCAL_W->m_IDX << 8;
|
||||
int b = LOCAL_E->m_IDX;
|
||||
rseed = rseed ^ (b | c);
|
||||
*(float*)(weapon + 2856ul) = 0.0f;
|
||||
RandomSeed(rseed);
|
||||
crit = vfunc<bool(*)(IClientEntity*)>(weapon, 1836 / 4, 0)(weapon);
|
||||
}
|
||||
} else {
|
||||
int md5seed = MD5_PseudoRandom(cmd->command_number) & 0x7fffffff;
|
||||
int rseed = md5seed;
|
||||
int& a = *(int*)((uintptr_t)(sharedobj::client->lmap->l_addr) + 0x01F8B228);
|
||||
a = md5seed;
|
||||
int c = LOCAL_W->m_IDX << 8;
|
||||
int b = LOCAL_E->m_IDX;
|
||||
rseed = rseed ^ (b | c);
|
||||
*(float*)(weapon + 2856ul) = 0.0f;
|
||||
RandomSeed(rseed);
|
||||
crit = vfunc<bool(*)(IClientEntity*)>(weapon, 1836 / 4, 0)(weapon);
|
||||
}
|
||||
//if (!crit) cmd->buttons &= ~IN_ATTACK;
|
||||
//else {
|
||||
/*logging::Info("found crit at cmd # %i # %i # %i", cmdn, cmd->command_number, tries);
|
||||
if (chc) {
|
||||
cmd->random_seed = MD5_PseudoRandom(cmdn) & 0x7fffffff;
|
||||
cmd->command_number = cmdn;
|
||||
}*/
|
||||
//}
|
||||
/*float bucket = *(float*)(weapon + 2612ul);
|
||||
int md5seed = MD5_PseudoRandom(cmd->command_number) & 0x7fffffff;
|
||||
int rseed = md5seed;
|
||||
int& a = *(int*)((uintptr_t)(sharedobj::client->lmap->l_addr) + 0x1F6D4A8);
|
||||
a = md5seed;
|
||||
int c = LOCAL_W->m_IDX << 8;
|
||||
int b = LOCAL_E->m_IDX;
|
||||
rseed = rseed ^ (b | c);
|
||||
*(float*)(weapon + 2856ul) = 0.0f;
|
||||
RandomSeed(rseed);
|
||||
bool cancrit = vfunc<bool(*)(IClientEntity*)>(weapon, 1836 / 4, 0)(weapon);
|
||||
if (!cancrit) {
|
||||
cmd->buttons &= ~IN_ATTACK;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (v_bSuppressCrits->GetBool() && !v_bCritHack->GetBool()) {
|
||||
if (crit) {
|
||||
bool crit = IsAttackACrit(cmd);
|
||||
if (v_bSuppressCrits->GetBool() && !v_bCritHack->GetBool() && WeaponCanCrit()) {
|
||||
if (crit && !IsPlayerCritBoosted(LOCAL_E)) {
|
||||
cmd->buttons &= ~IN_ATTACK;
|
||||
//logging::Info("suppressing crit");
|
||||
}
|
||||
} else if (v_bCritHack->GetBool()) {
|
||||
} else if (v_bCritHack->GetBool() && RandomCrits() && WeaponCanCrit()) {
|
||||
if (!crit) cmd->buttons &= ~IN_ATTACK;
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "common.h"
|
||||
#include "hooks.h"
|
||||
#include "sdk.h"
|
||||
#include "profiler.h"
|
||||
|
||||
#include <pwd.h>
|
||||
#include <sys/mman.h>
|
||||
@ -33,6 +34,7 @@ void BeginConVars() {
|
||||
}
|
||||
|
||||
void EndConVars() {
|
||||
RegisterCatVars();
|
||||
if (hConVarsFile) {
|
||||
fprintf(hConVarsFile, "\nexec cat_autoexec\n");
|
||||
fprintf(hConVarsFile, "cat_killsay_reload\ncat_spam_reload\n");
|
||||
@ -323,8 +325,10 @@ bool IsEntityVectorVisible(CachedEntity* entity, Vector endpos) {
|
||||
Ray_t ray;
|
||||
trace::g_pFilterDefault->SetSelf(RAW_ENT(g_pLocalPlayer->entity));
|
||||
ray.Init(g_pLocalPlayer->v_Eye, endpos);
|
||||
interfaces::trace->TraceRay(ray, MASK_SHOT_HULL, trace::g_pFilterDefault, &trace_object);
|
||||
//logging::Info("%.2f expected %s got %s", trace_object.fraction, RAW_ENT(entity)->GetClientClass()->GetName(), trace_object.m_pEnt ? ((IClientEntity*)trace_object.m_pEnt)->GetClientClass()->GetName() : "NULL");
|
||||
{
|
||||
PROF_SECTION(IEVV_TraceRay);
|
||||
interfaces::trace->TraceRay(ray, MASK_SHOT, trace::g_pFilterDefault, &trace_object);
|
||||
}
|
||||
return (trace_object.fraction >= 0.99f || (((IClientEntity*)trace_object.m_pEnt)) == RAW_ENT(entity));
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,8 @@ float AngleDiff( float destAngle, float srcAngle )
|
||||
return delta;
|
||||
}//TODO temporary
|
||||
|
||||
#include "../profiler.h"
|
||||
|
||||
bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
|
||||
SEGV_BEGIN;
|
||||
|
||||
@ -40,6 +42,8 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
|
||||
}
|
||||
bool ret = ((CreateMove_t*)hooks::hkClientMode->GetMethod(hooks::offCreateMove))(thisptr, inputSample, cmd);
|
||||
|
||||
PROF_SECTION(CreateMove);
|
||||
|
||||
if (!cmd) {
|
||||
return ret;
|
||||
}
|
||||
@ -78,11 +82,14 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
|
||||
gEntityCache.Invalidate();
|
||||
}
|
||||
// PROF_BEGIN();
|
||||
SAFE_CALL(gEntityCache.Update());
|
||||
{ PROF_SECTION(EntityCache); SAFE_CALL(gEntityCache.Update()); }
|
||||
// PROF_END("Entity Cache updating");
|
||||
SAFE_CALL(g_pPlayerResource->Update());
|
||||
SAFE_CALL(g_pLocalPlayer->Update());
|
||||
g_Settings.bInvalid = false;
|
||||
// Disabled because this causes EXTREME aimbot inaccuracy
|
||||
//if (!cmd->command_number) return ret;
|
||||
gEntityCache.PruneStrings();
|
||||
if (CE_GOOD(g_pLocalPlayer->entity)) {
|
||||
g_pLocalPlayer->v_OrigViewangles = cmd->viewangles;
|
||||
// PROF_BEGIN();
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "hookedmethods.h"
|
||||
#include "../gui/GUI.h"
|
||||
#include "../segvcatch/segvcatch.h"
|
||||
#include "../profiler.h"
|
||||
|
||||
void PaintTraverse_hook(void* p, unsigned int vp, bool fr, bool ar) {
|
||||
#if DEBUG_SEGV == true
|
||||
@ -33,6 +34,7 @@ void PaintTraverse_hook(void* p, unsigned int vp, bool fr, bool ar) {
|
||||
|
||||
|
||||
if (call_default) SAFE_CALL(((PaintTraverse_t*)hooks::hkPanel->GetMethod(hooks::offPaintTraverse))(p, vp, fr, ar));
|
||||
PROF_SECTION(PaintTraverse);
|
||||
if (vp == panel_top) draw_flag = true;
|
||||
if (!g_Settings.bHackEnabled->GetBool()) return;
|
||||
// Because of single-multi thread shit I'm gonna put this thing riiiight here.
|
||||
|
@ -28,6 +28,8 @@ typedef void(LevelInit_t)(void*, const char*);
|
||||
typedef void(LevelShutdown_t)(void*);
|
||||
typedef void(BeginFrame_t)(IStudioRender*);
|
||||
typedef bool(*CanInspect_t)(IClientEntity*);
|
||||
//typedef void(*CInput__CreateMove_t)(void*, int, float, bool);
|
||||
//void CInput__CreateMove_hook(void*, int sequence_number, float input_sample_frametime, bool active);
|
||||
bool CanInspect_hook(IClientEntity*);
|
||||
const unsigned int offCanInspect = 512;
|
||||
void BeginFrame_hook(IStudioRender*);
|
||||
|
@ -50,7 +50,7 @@ void Shutdown_hook(void* thisptr, const char* reason) {
|
||||
SEGV_BEGIN;
|
||||
if (g_Settings.bHackEnabled->GetBool()) {
|
||||
const char* new_reason = reason;
|
||||
if (g_Settings.sDisconnectMsg->m_pConVar->m_StringLength > 3) {
|
||||
if (g_Settings.sDisconnectMsg->convar->m_StringLength > 3) {
|
||||
new_reason = g_Settings.sDisconnectMsg->GetString();
|
||||
}
|
||||
((Shutdown_t*)hooks::hkNetChannel->GetMethod(hooks::offShutdown))(thisptr, new_reason);
|
||||
|
@ -7,38 +7,44 @@
|
||||
|
||||
#include "profiler.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "sdk.h"
|
||||
#include "logging.h"
|
||||
|
||||
#if ENABLE_PROFILER
|
||||
|
||||
int g_ProfilerDepth = 0;
|
||||
long g_ProfilerSections[MAX_PROFILER_SECTIONS];
|
||||
|
||||
void PROFILER_BeginSection() {
|
||||
if (!ENABLE_PROFILER) return;
|
||||
if (g_ProfilerDepth == MAX_PROFILER_SECTIONS - 1) {
|
||||
logging::Info("Max profiler depth reached!");
|
||||
return;
|
||||
}
|
||||
g_ProfilerDepth++;
|
||||
timespec ts;
|
||||
clock_gettime(CLOCK_REALTIME, &ts);
|
||||
g_ProfilerSections[g_ProfilerDepth] = ts.tv_nsec;
|
||||
ProfilerSection::ProfilerSection(std::string name) {
|
||||
m_name = name;
|
||||
m_calls = 0;
|
||||
m_log = std::chrono::high_resolution_clock::now();
|
||||
m_min = std::chrono::nanoseconds::zero();
|
||||
m_max = std::chrono::nanoseconds::zero();
|
||||
m_sum = std::chrono::nanoseconds::zero();
|
||||
}
|
||||
|
||||
void PROFILER_EndSection(char* name) {
|
||||
if (!ENABLE_PROFILER) return;
|
||||
if (g_ProfilerDepth == 0) {
|
||||
logging::Info("Profiler underflow!");
|
||||
return;
|
||||
void ProfilerSection::OnNodeDeath(ProfilerNode& node) {
|
||||
auto dur = std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::high_resolution_clock::now() - node.m_start);
|
||||
if (m_min == std::chrono::nanoseconds::zero()) m_min = dur;
|
||||
else if (dur < m_min) m_min = dur;
|
||||
|
||||
if (m_max == std::chrono::nanoseconds::zero()) m_max = dur;
|
||||
else if (dur > m_max) m_max = dur;
|
||||
m_sum += dur;
|
||||
m_calls++;
|
||||
|
||||
if (std::chrono::duration_cast<std::chrono::seconds>(std::chrono::high_resolution_clock::now() - m_log).count() > 3) {
|
||||
logging::Info("[P] stats for '%-32s': MIN{%12llu} MAX{%12llu} AVG{%12llu}", m_name.c_str(),
|
||||
std::chrono::duration_cast<std::chrono::nanoseconds>(m_min).count(),
|
||||
std::chrono::duration_cast<std::chrono::nanoseconds>(m_max).count(),
|
||||
std::chrono::duration_cast<std::chrono::nanoseconds>(m_sum).count() / (m_calls ? m_calls : 1));
|
||||
m_log = std::chrono::high_resolution_clock::now();
|
||||
m_min = std::chrono::nanoseconds::zero();
|
||||
m_max = std::chrono::nanoseconds::zero();
|
||||
m_sum = std::chrono::nanoseconds::zero();
|
||||
m_calls = 0;
|
||||
}
|
||||
if (g_ProfilerDepth <= PROFILER_OUTPUT_DEPTH && g_Settings.bProfiler->GetBool()) {
|
||||
timespec ts;
|
||||
clock_gettime(CLOCK_REALTIME, &ts);
|
||||
logging::Info("[PROF] %s took %ldus!", name, (ts.tv_nsec - g_ProfilerSections[g_ProfilerDepth]));
|
||||
}
|
||||
g_ProfilerDepth--;
|
||||
}
|
||||
|
||||
#endif
|
||||
ProfilerNode::ProfilerNode(ProfilerSection& section) : m_section(section) {
|
||||
m_start = std::chrono::high_resolution_clock::now();
|
||||
}
|
||||
|
||||
ProfilerNode::~ProfilerNode() {
|
||||
m_section.OnNodeDeath(*this);
|
||||
}
|
||||
|
@ -8,23 +8,43 @@
|
||||
#ifndef PROFILER_H_
|
||||
#define PROFILER_H_
|
||||
|
||||
#include <time.h>
|
||||
#include "beforecheaders.h"
|
||||
#include <chrono>
|
||||
#include <string>
|
||||
#include "aftercheaders.h"
|
||||
|
||||
// TODO this whole profiler thing could be done a lot better..
|
||||
class ProfilerNode;
|
||||
|
||||
class ProfilerSection {
|
||||
public:
|
||||
ProfilerSection(std::string name);
|
||||
|
||||
void OnNodeDeath(ProfilerNode& node);
|
||||
|
||||
std::chrono::nanoseconds m_min;
|
||||
std::chrono::nanoseconds m_max;
|
||||
std::chrono::nanoseconds m_sum;
|
||||
unsigned m_calls;
|
||||
std::chrono::time_point<std::chrono::high_resolution_clock> m_log;
|
||||
std::string m_name;
|
||||
};
|
||||
|
||||
class ProfilerNode {
|
||||
public:
|
||||
ProfilerNode(ProfilerSection& section);
|
||||
~ProfilerNode();
|
||||
|
||||
std::chrono::time_point<std::chrono::high_resolution_clock> m_start;
|
||||
ProfilerSection& m_section;
|
||||
};
|
||||
|
||||
#define ENABLE_PROFILER false
|
||||
#define PROFILER_OUTPUT_DEPTH 7
|
||||
#define MAX_PROFILER_SECTIONS 16
|
||||
|
||||
#if ENABLE_PROFILER == true
|
||||
#define PROF_BEGIN() PROFILER_BeginSection()
|
||||
#define PROF_END(X) PROFILER_EndSection(X)
|
||||
#if ENABLE_PROFILER
|
||||
#define PROF_SECTION(id) \
|
||||
static ProfilerSection __PROFILER__##id(#id); \
|
||||
ProfilerNode __PROFILER_NODE__##id(__PROFILER__##id);
|
||||
#else
|
||||
#define PROF_BEGIN(X)
|
||||
#define PROF_END(X)
|
||||
#define PROF_SECTION(id)
|
||||
#endif
|
||||
|
||||
void PROFILER_BeginSection();
|
||||
void PROFILER_EndSection(char* name);
|
||||
|
||||
#endif /* PROFILER_H_ */
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include <iserver.h>
|
||||
#include <view_shared.h>
|
||||
#include <KeyValues.h>
|
||||
#include <checksum_md5.h>
|
||||
#include <basehandle.h>
|
||||
#include <iachievementmgr.h>
|
||||
#include <VGuiMatSurface/IMatSystemSurface.h>
|
||||
|
@ -1,12 +0,0 @@
|
||||
/*
|
||||
* ITargetSystem.cpp
|
||||
*
|
||||
* Created on: Nov 30, 2016
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#include "ITargetSystem.h"
|
||||
#include "../common.h"
|
||||
|
||||
ITargetSystem::~ITargetSystem() {};
|
||||
|
@ -1,18 +0,0 @@
|
||||
/*
|
||||
* ITargetSystem.h
|
||||
*
|
||||
* Created on: Nov 30, 2016
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#ifndef ITARGETSYSTEM_H_
|
||||
#define ITARGETSYSTEM_H_
|
||||
|
||||
class ITargetSystem {
|
||||
public:
|
||||
virtual ~ITargetSystem();
|
||||
virtual int GetScore(int idx) = 0;
|
||||
virtual const char* Name() = 0;
|
||||
};
|
||||
|
||||
#endif /* ITARGETSYSTEM_H_ */
|
@ -1,15 +0,0 @@
|
||||
/*
|
||||
* TargetSystemDistance.cpp
|
||||
*
|
||||
* Created on: Nov 30, 2016
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#include "TargetSystemDistance.h"
|
||||
|
||||
int TargetSystemDistance::GetScore(int idx) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,19 +0,0 @@
|
||||
/*
|
||||
* TargetSystemDistance.h
|
||||
*
|
||||
* Created on: Nov 30, 2016
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#ifndef TARGETSYSTEMDISTANCE_H_
|
||||
#define TARGETSYSTEMDISTANCE_H_
|
||||
|
||||
#include "ITargetSystem.h"
|
||||
|
||||
class TargetSystemDistance : public ITargetSystem {
|
||||
public:
|
||||
virtual int GetScore(int idx);
|
||||
inline virtual const char* Name() { return "CLOSEST ENEMY"; };
|
||||
};
|
||||
|
||||
#endif /* TARGETSYSTEMDISTANCE_H_ */
|
@ -1,12 +0,0 @@
|
||||
/*
|
||||
* TargetSystemFOV.cpp
|
||||
*
|
||||
* Created on: Nov 30, 2016
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#include "TargetSystemFOV.h"
|
||||
|
||||
int TargetSystemFOV::GetScore(int idx) {
|
||||
return 0;
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
/*
|
||||
* TargetSystemFOV.h
|
||||
*
|
||||
* Created on: Nov 30, 2016
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#ifndef TARGETSYSTEMFOV_H_
|
||||
#define TARGETSYSTEMFOV_H_
|
||||
|
||||
#include "ITargetSystem.h"
|
||||
|
||||
class TargetSystemFOV : public ITargetSystem {
|
||||
public:
|
||||
virtual int GetScore(int idx);
|
||||
inline virtual const char* Name() { return "FOV"; };
|
||||
};
|
||||
|
||||
#endif /* TARGETSYSTEMFOV_H_ */
|
@ -1,10 +0,0 @@
|
||||
/*
|
||||
* TargetSystemHealth.cpp
|
||||
*
|
||||
* Created on: Dec 22, 2016
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
/*
|
||||
* TargetSystemHealth.h
|
||||
*
|
||||
* Created on: Dec 22, 2016
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#ifndef TARGETSYSTEMHEALTH_H_
|
||||
#define TARGETSYSTEMHEALTH_H_
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* TARGETSYSTEMHEALTH_H_ */
|
@ -1,10 +0,0 @@
|
||||
/*
|
||||
* TargetSystemMedigun.cpp
|
||||
*
|
||||
* Created on: Dec 22, 2016
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
/*
|
||||
* TargetSystemMedigun.h
|
||||
*
|
||||
* Created on: Dec 22, 2016
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#ifndef TARGETSYSTEMMEDIGUN_H_
|
||||
#define TARGETSYSTEMMEDIGUN_H_
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* TARGETSYSTEMMEDIGUN_H_ */
|
@ -1,13 +0,0 @@
|
||||
/*
|
||||
* TargetSystemSmart.cpp
|
||||
*
|
||||
* Created on: Nov 30, 2016
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#include "TargetSystemSmart.h"
|
||||
|
||||
int TargetSystemSmart::GetScore(int idx) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,21 +0,0 @@
|
||||
/*
|
||||
* TargetSystemSmart.h
|
||||
*
|
||||
* Created on: Nov 30, 2016
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#ifndef TARGETSYSTEMSMART_H_
|
||||
#define TARGETSYSTEMSMART_H_
|
||||
|
||||
#include "ITargetSystem.h"
|
||||
|
||||
class ConVar;
|
||||
|
||||
class TargetSystemSmart : public ITargetSystem {
|
||||
public:
|
||||
virtual int GetScore(int idx);
|
||||
inline virtual const char* Name() { return "SMART"; };
|
||||
};
|
||||
|
||||
#endif /* TARGETSYSTEMSMART_H_ */
|
Reference in New Issue
Block a user