forked from sstokic-tgm/Gladiatorcheatz-Public
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCSFuncs.hpp
97 lines (77 loc) · 2.48 KB
/
CSFuncs.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#pragma once
#include "harCs.hpp"
#define M_PI 3.14159265358979323846f
#define M_RADPI 57.295779513082f
#define M_PI_F ((float)(M_PI))
#define RAD2DEG(x) ((float)(x) * (float)(180.f / M_PI_F))
#define DEG2RAD(x) ((float)(x) * (float)(M_PI_F / 180.f))
class Entity;
class CntDwnTimer;
class CSFuncs;
/* CntDwnTimer */
class CntDwnTimer
{
public:
CntDwnTimer();
void reset();
void start(float dur);
bool isElapsed();
float getRemainingTime() const;
float getPercentge() const;
float getTimeLength() const;
private:
float dur;
float timestmp;
virtual float now() const;
float timeLength;
};
class CSFuncs
{
public:
HMODULE hClientDll, hEngineDll;
DWORD_PTR clientDllSize, engineDllSize;
MODULEINFO modClientDll, modEngineDll;
DWORD dClientDll, dEngineDll, dClientDllSize, dEngineDllSize;
void init();
CSFuncs() {};
~CSFuncs();
DWORD getClientMode();
DWORD getIsRdy();
DWORD getD3D();
DWORD getEntityList();
DWORD getLocalPlayer();
DWORD getEngine();
DWORD getRenderView();
int getLocPlyrConnect(DWORD base);
DWORD getEntityById(DWORD id);
DWORD getGlowObjects();
DWORD getGlowObjectCount();
DWORD getInCross();
DWORD getGameRes();
char *getWeapName(int idx);
bool isWeapPistol(int idx);
bool isWeapSniper(int idx);
bool isWeapNonAim(int idx);
void randomSeed(int iSeed);
float randomFloat(float min, float max);
int randomInt(int min, int max);
void normaleAechse(Vector3 &vektRein);
float distance(Vector3 loc, Vector3 rem);
Vector3 racunajAechse(Vector3 src, Vector3 dst);
void aechseVektor(Vector3 aechse, float *forward, float *right, float *up);
void umiri(Vector3 src, Vector3 &dst, float factor);
void praviVektor(Vector3 src, Vector3 &dst);
float getFoV(const Vector3 &viewAechse, const Vector3 &viewUgao);
void vekAechse(Vector3 &forward, Vector3 &aechse);
void vekAechse2(Vector3 &forward, Vector3 &aechse);
void vekAechse(Vector3 &forward, Vector3 &up, Vector3 &aechse);
bool isVis(Vector3 loc, Vector3 rem, Entity *base);
DWORD findPattern(char *pattern, char *mask, DWORD start, DWORD end, DWORD offset);
private:
bool findOffset(DWORD moduleBase, DWORD moduleSize, char *pattern, char *mask, DWORD addressOffset, char *offsetName, DWORD *offsetAddress, bool subtractBase = false);
void getOffsets(DWORD clientDll, DWORD clientDllSize, DWORD engineDll, DWORD engineDllSize);
bool findLocalPlayer(DWORD clientDll, DWORD clientDllSize);
bool findEntityList(DWORD clientDll, DWORD clientDllSize);
};
extern CSFuncs *csFuncs;
extern CntDwnTimer coravTimer;