forked from M-r-J-o-h-n/Rust-External-Cheat
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAimbot.h
59 lines (45 loc) · 1.05 KB
/
Aimbot.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
#pragma once
#include <cstdint>
#include "Vector.h"
#include "CheatStructs.h"
namespace Rust {
class Aimbot
{
public:
Aimbot();
~Aimbot();
void exec();
struct setting {
bool enable;
bool prediction;
float fov;
};
private:
bool m_TargetExist;
CheatStruct::EntityAddresses m_TargetData;
void Apply_Predicition(Cheat::Vector3& position);
Cheat::Vector2 CalcAngle(const Cheat::Vector3& LocalPos, const Cheat::Vector3& EnemyPos);
bool FindTarget();
float to_radian(float degree)
{
return degree * 3.141592f / 180.f;
}
float to_degree(float radian)
{
return radian * 180.f / 3.141592f;
}
void Normalize(float& Yaw, float& Pitch) { // OnlyDegree // 위 일때 pitch 은 음수값 아래일때 pitch + 값 yaw 은 -360~360
if (Pitch < -89)
Pitch = -89;
else if (Pitch > 89)
Pitch = 89;
if (Yaw < -360)
Yaw += 360;
else if (Yaw > 360)
Yaw -= 360;
}
void SmoothAim(Cheat::Vector2& Angle, float smooth) {
Angle /= smooth;
}
};
}