diff --git a/src/beforecheaders.h b/src/beforecheaders.h index b95900af..c063a9b0 100644 --- a/src/beforecheaders.h +++ b/src/beforecheaders.h @@ -1,2 +1,5 @@ #undef min #undef max + +#undef private +#undef public diff --git a/src/cvwrapper.cpp b/src/cvwrapper.cpp index 233b2bbd..09179ef0 100644 --- a/src/cvwrapper.cpp +++ b/src/cvwrapper.cpp @@ -42,23 +42,6 @@ int CatEnum::Minimum() { 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) { diff --git a/src/cvwrapper.h b/src/cvwrapper.h index ae047b7f..bc6d55cd 100644 --- a/src/cvwrapper.h +++ b/src/cvwrapper.h @@ -10,6 +10,8 @@ class ConVar; +#include "sdk.h" + #include "beforecheaders.h" #include #include @@ -61,13 +63,13 @@ public: inline void SetDescription(std::string description) { m_strDescription = description; } inline std::string Description() { return m_strDescription; } - bool GetBool(); - int GetInt(); - float GetFloat(); - const char* GetString(); - void SetValue(float value); - void SetValue(std::string value); - void SetValue(int value); + inline bool GetBool() const { return m_pConVar->GetBool(); } + inline int GetInt() const { return m_pConVar->GetInt(); } + inline float GetFloat() const { return m_pConVar->GetFloat(); }; + inline const char* GetString() const { return m_pConVar->GetString(); } + inline void SetValue(float value) { m_pConVar->SetValue(value); } + inline void SetValue(std::string value) { m_pConVar->SetValue(value.c_str()); } + inline void SetValue(int value) { m_pConVar->SetValue(value); } void Increment(int factor = 1); void Decrement(int factor = 1); diff --git a/src/hack.cpp b/src/hack.cpp index 5f845df9..d69f0a96 100644 --- a/src/hack.cpp +++ b/src/hack.cpp @@ -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" diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index d577469e..aa1c61fa 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -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); diff --git a/src/targeting/ITargetSystem.cpp b/src/targeting/ITargetSystem.cpp deleted file mode 100644 index 7f300cae..00000000 --- a/src/targeting/ITargetSystem.cpp +++ /dev/null @@ -1,12 +0,0 @@ -/* - * ITargetSystem.cpp - * - * Created on: Nov 30, 2016 - * Author: nullifiedcat - */ - -#include "ITargetSystem.h" -#include "../common.h" - -ITargetSystem::~ITargetSystem() {}; - diff --git a/src/targeting/ITargetSystem.h b/src/targeting/ITargetSystem.h deleted file mode 100644 index e9793bfe..00000000 --- a/src/targeting/ITargetSystem.h +++ /dev/null @@ -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_ */ diff --git a/src/targeting/TargetSystemDistance.cpp b/src/targeting/TargetSystemDistance.cpp deleted file mode 100644 index ee1343b9..00000000 --- a/src/targeting/TargetSystemDistance.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* - * TargetSystemDistance.cpp - * - * Created on: Nov 30, 2016 - * Author: nullifiedcat - */ - -#include "TargetSystemDistance.h" - -int TargetSystemDistance::GetScore(int idx) { - return 0; -} - - - diff --git a/src/targeting/TargetSystemDistance.h b/src/targeting/TargetSystemDistance.h deleted file mode 100644 index 540e723b..00000000 --- a/src/targeting/TargetSystemDistance.h +++ /dev/null @@ -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_ */ diff --git a/src/targeting/TargetSystemFOV.cpp b/src/targeting/TargetSystemFOV.cpp deleted file mode 100644 index 0c6fc2ae..00000000 --- a/src/targeting/TargetSystemFOV.cpp +++ /dev/null @@ -1,12 +0,0 @@ -/* - * TargetSystemFOV.cpp - * - * Created on: Nov 30, 2016 - * Author: nullifiedcat - */ - -#include "TargetSystemFOV.h" - -int TargetSystemFOV::GetScore(int idx) { - return 0; -} diff --git a/src/targeting/TargetSystemFOV.h b/src/targeting/TargetSystemFOV.h deleted file mode 100644 index 47ce28d8..00000000 --- a/src/targeting/TargetSystemFOV.h +++ /dev/null @@ -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_ */ diff --git a/src/targeting/TargetSystemHealth.cpp b/src/targeting/TargetSystemHealth.cpp deleted file mode 100644 index 854665db..00000000 --- a/src/targeting/TargetSystemHealth.cpp +++ /dev/null @@ -1,10 +0,0 @@ -/* - * TargetSystemHealth.cpp - * - * Created on: Dec 22, 2016 - * Author: nullifiedcat - */ - - - - diff --git a/src/targeting/TargetSystemHealth.h b/src/targeting/TargetSystemHealth.h deleted file mode 100644 index 0dfb5ce4..00000000 --- a/src/targeting/TargetSystemHealth.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * TargetSystemHealth.h - * - * Created on: Dec 22, 2016 - * Author: nullifiedcat - */ - -#ifndef TARGETSYSTEMHEALTH_H_ -#define TARGETSYSTEMHEALTH_H_ - - - - - -#endif /* TARGETSYSTEMHEALTH_H_ */ diff --git a/src/targeting/TargetSystemMedigun.cpp b/src/targeting/TargetSystemMedigun.cpp deleted file mode 100644 index d27eb692..00000000 --- a/src/targeting/TargetSystemMedigun.cpp +++ /dev/null @@ -1,10 +0,0 @@ -/* - * TargetSystemMedigun.cpp - * - * Created on: Dec 22, 2016 - * Author: nullifiedcat - */ - - - - diff --git a/src/targeting/TargetSystemMedigun.h b/src/targeting/TargetSystemMedigun.h deleted file mode 100644 index d573c534..00000000 --- a/src/targeting/TargetSystemMedigun.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * TargetSystemMedigun.h - * - * Created on: Dec 22, 2016 - * Author: nullifiedcat - */ - -#ifndef TARGETSYSTEMMEDIGUN_H_ -#define TARGETSYSTEMMEDIGUN_H_ - - - - - -#endif /* TARGETSYSTEMMEDIGUN_H_ */ diff --git a/src/targeting/TargetSystemSmart.cpp b/src/targeting/TargetSystemSmart.cpp deleted file mode 100644 index a93c2e93..00000000 --- a/src/targeting/TargetSystemSmart.cpp +++ /dev/null @@ -1,13 +0,0 @@ -/* - * TargetSystemSmart.cpp - * - * Created on: Nov 30, 2016 - * Author: nullifiedcat - */ - -#include "TargetSystemSmart.h" - -int TargetSystemSmart::GetScore(int idx) { - return 0; -} - diff --git a/src/targeting/TargetSystemSmart.h b/src/targeting/TargetSystemSmart.h deleted file mode 100644 index d1ed3b72..00000000 --- a/src/targeting/TargetSystemSmart.h +++ /dev/null @@ -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_ */