-
Notifications
You must be signed in to change notification settings - Fork 1
/
NewResolver.h
99 lines (73 loc) · 2.53 KB
/
NewResolver.h
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
98
99
#pragma once
#include "Interfaces.h"
#include "Hacks.h"
#include <deque>
#include "Backtrack.h"
extern int missedLogHits[65];
extern float saveLastHeadshotFloat[65];
extern float saveLastBaimFloat[65];
extern float saveLastBaim30Float[65];
extern float enemysLastProxyTimer[65];
extern bool shotFakeHeadOnce[65];
extern int fakeshotMissedLast[65];
namespace Globals
{
extern CUserCmd* UserCmd;
extern IClientEntity* Target;
extern int Shots;
extern bool change;
extern int TargetID;
extern int getShotsFired;
}
extern int ResolverStage[65];
struct CTickRecord {
CTickRecord() {}
CTickRecord(IClientEntity* ent) {
m_flLowerBodyYawTarget = ent->GetLowerBodyYaw();
m_angEyeAngles = ent->GetEyeAngles();
m_flSimulationTime = ent->GetSimulationTime();
m_vecOrigin = ent->GetOrigin();
m_vecVelocity = ent->GetVelocity();
m_angAbsAngles = ent->GetAbsAngles();
m_vecAbsOrigin = ent->GetAbsOrigin();
tickcount = 0;
}
float m_flLowerBodyYawTarget = 0.f;
QAngle m_angEyeAngles = QAngle(0, 0, 0);
float m_flCycle = 0.f;
float m_flSimulationTime = 0.f;
int m_nSequence = 0;
Vector m_vecOrigin = Vector(0, 0, 0);
Vector m_vecAbsOrigin = Vector(0, 0, 0);
Vector m_vecVelocity = Vector(0, 0, 0);
QAngle m_angAbsAngles = QAngle(0, 0, 0);
int tickcount = 0;
};
class CResolveInfo {
friend class ayyResolver;
protected:
std::deque<CTickRecord> m_sRecords;
bool m_bEnemyShot; //priority
bool m_bLowerBodyYawChanged;
bool m_bBacktrackThisTick;
};
class ayyResolver
{
friend class CBacktracking;
public:
void Init();
void StoreVars(IClientEntity * pEntity);
bool HasStaticRealAngle(const std::deque<CTickRecord>& l, float tolerance);
bool HasStaticYawDifference(const std::deque<CTickRecord>& l, float tolerance);
bool HasSteadyDifference(const std::deque<CTickRecord>& l, float tolerance, IClientEntity * pEnt);
int GetDifferentDeltas(const std::deque<CTickRecord>& l, float tolerance);
int GetDifferentLBYs(const std::deque<CTickRecord>& l, float tolerance);
float GetLBYByComparingTicks(const std::deque<CTickRecord>& l, IClientEntity * pEnt);
float GetDeltaByComparingTicks(const std::deque<CTickRecord>& l, IClientEntity * pEnt);
bool DeltaKeepsChanging(const std::deque<CTickRecord>& cur, float tolerance);
bool LBYKeepsChanging(const std::deque<CTickRecord>& cur, float tolerance);
void Store(IClientEntity * Entity);
float ResolveYaw(IClientEntity* pPlayer, float org_yaw);
private:
std::array<CResolveInfo, 32> m_arrInfos;
};