fix compile errors?

This commit is contained in:
nullifiedcat 2017-02-24 16:06:53 +03:00
parent a762d2c40f
commit 8b639c1550
14 changed files with 182 additions and 1 deletions

1
src/.gitignore vendored
View File

@ -1 +0,0 @@
/targeting/

View File

@ -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)

View File

@ -0,0 +1,12 @@
/*
* ITargetSystem.cpp
*
* Created on: Nov 30, 2016
* Author: nullifiedcat
*/
#include "ITargetSystem.h"
#include "../common.h"
ITargetSystem::~ITargetSystem() {};

View File

@ -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_ */

View File

@ -0,0 +1,15 @@
/*
* TargetSystemDistance.cpp
*
* Created on: Nov 30, 2016
* Author: nullifiedcat
*/
#include "TargetSystemDistance.h"
int TargetSystemDistance::GetScore(int idx) {
return 0;
}

View File

@ -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_ */

View File

@ -0,0 +1,12 @@
/*
* TargetSystemFOV.cpp
*
* Created on: Nov 30, 2016
* Author: nullifiedcat
*/
#include "TargetSystemFOV.h"
int TargetSystemFOV::GetScore(int idx) {
return 0;
}

View File

@ -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_ */

View File

@ -0,0 +1,10 @@
/*
* TargetSystemHealth.cpp
*
* Created on: Dec 22, 2016
* Author: nullifiedcat
*/

View File

@ -0,0 +1,15 @@
/*
* TargetSystemHealth.h
*
* Created on: Dec 22, 2016
* Author: nullifiedcat
*/
#ifndef TARGETSYSTEMHEALTH_H_
#define TARGETSYSTEMHEALTH_H_
#endif /* TARGETSYSTEMHEALTH_H_ */

View File

@ -0,0 +1,10 @@
/*
* TargetSystemMedigun.cpp
*
* Created on: Dec 22, 2016
* Author: nullifiedcat
*/

View File

@ -0,0 +1,15 @@
/*
* TargetSystemMedigun.h
*
* Created on: Dec 22, 2016
* Author: nullifiedcat
*/
#ifndef TARGETSYSTEMMEDIGUN_H_
#define TARGETSYSTEMMEDIGUN_H_
#endif /* TARGETSYSTEMMEDIGUN_H_ */

View File

@ -0,0 +1,13 @@
/*
* TargetSystemSmart.cpp
*
* Created on: Nov 30, 2016
* Author: nullifiedcat
*/
#include "TargetSystemSmart.h"
int TargetSystemSmart::GetScore(int idx) {
return 0;
}

View File

@ -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_ */