diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 69840a91..00000000 --- a/src/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/targeting/ diff --git a/src/helpers.h b/src/helpers.h index a81135a3..4d7a4676 100644 --- a/src/helpers.h +++ b/src/helpers.h @@ -17,6 +17,9 @@ class CCommand; struct player_info_s; class Vector; +class ICvar; +void SetCVarInterface(ICvar* iface); + #define PI 3.14159265358979323846f #define RADPI 57.295779513082f //#define DEG2RAD(x) (float)(x) * (float)(PI / 180.0f) diff --git a/src/targeting/ITargetSystem.cpp b/src/targeting/ITargetSystem.cpp new file mode 100644 index 00000000..7f300cae --- /dev/null +++ b/src/targeting/ITargetSystem.cpp @@ -0,0 +1,12 @@ +/* + * 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 new file mode 100644 index 00000000..e9793bfe --- /dev/null +++ b/src/targeting/ITargetSystem.h @@ -0,0 +1,18 @@ +/* + * 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 new file mode 100644 index 00000000..ee1343b9 --- /dev/null +++ b/src/targeting/TargetSystemDistance.cpp @@ -0,0 +1,15 @@ +/* + * 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 new file mode 100644 index 00000000..540e723b --- /dev/null +++ b/src/targeting/TargetSystemDistance.h @@ -0,0 +1,19 @@ +/* + * 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 new file mode 100644 index 00000000..0c6fc2ae --- /dev/null +++ b/src/targeting/TargetSystemFOV.cpp @@ -0,0 +1,12 @@ +/* + * 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 new file mode 100644 index 00000000..47ce28d8 --- /dev/null +++ b/src/targeting/TargetSystemFOV.h @@ -0,0 +1,19 @@ +/* + * 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 new file mode 100644 index 00000000..854665db --- /dev/null +++ b/src/targeting/TargetSystemHealth.cpp @@ -0,0 +1,10 @@ +/* + * TargetSystemHealth.cpp + * + * Created on: Dec 22, 2016 + * Author: nullifiedcat + */ + + + + diff --git a/src/targeting/TargetSystemHealth.h b/src/targeting/TargetSystemHealth.h new file mode 100644 index 00000000..0dfb5ce4 --- /dev/null +++ b/src/targeting/TargetSystemHealth.h @@ -0,0 +1,15 @@ +/* + * 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 new file mode 100644 index 00000000..d27eb692 --- /dev/null +++ b/src/targeting/TargetSystemMedigun.cpp @@ -0,0 +1,10 @@ +/* + * TargetSystemMedigun.cpp + * + * Created on: Dec 22, 2016 + * Author: nullifiedcat + */ + + + + diff --git a/src/targeting/TargetSystemMedigun.h b/src/targeting/TargetSystemMedigun.h new file mode 100644 index 00000000..d573c534 --- /dev/null +++ b/src/targeting/TargetSystemMedigun.h @@ -0,0 +1,15 @@ +/* + * 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 new file mode 100644 index 00000000..a93c2e93 --- /dev/null +++ b/src/targeting/TargetSystemSmart.cpp @@ -0,0 +1,13 @@ +/* + * 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 new file mode 100644 index 00000000..d1ed3b72 --- /dev/null +++ b/src/targeting/TargetSystemSmart.h @@ -0,0 +1,21 @@ +/* + * 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_ */