This repository has been archived by the owner on Feb 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
memory.h
162 lines (129 loc) · 2.49 KB
/
memory.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
#pragma once
#include <cstdint>
#include "./math.h"
#include "api.h"
#include <vector>
static const vec3 vector3zero = vec3(0, 0, 0);
struct Entity {
uintptr_t object;
vec3 position;
};
struct Player : Entity {
uintptr_t ccm, pms, referenceHub;
Il2CppString name, role;
int team;
uint32_t netId;
bool visible;
bool isLocalPlayer;
int id, hp;
int itemId;
vec3 screenPos;
void Reset() {
object = NULL;
position = vector3zero;
ccm = NULL;
team = 0;
visible = false;
isLocalPlayer = false;
name = api::EmptyStr();
role = api::EmptyStr();
}
Player() {
Reset();
}
};
struct Pickup : Entity {
ItemType itemId;
void Reset()
{
object = NULL;
position = vector3zero;
itemId = ItemType::NoneIT;
}
Pickup() {
Reset();
}
};
struct Location : Entity {
RoomName name;
void Reset() {
object = NULL;
position = vector3zero;
name = RoomName::Unnamed;
}
Location() {
Reset();
}
};
std::vector<Player> entityList;
std::vector<Pickup> itemList;
std::vector<Location> locationList;
Player aimbotTarget = Player();
int aimbotMask = 0;
bool cachedMask = false;
uintptr_t curRole, oldRole;
uintptr_t CustomNetManagerTransform;
void EspReset() {
entityList.clear();
locationList.clear();
itemList.clear();
}
namespace Local {
vec3 position, serverPosition;
int role;
uintptr_t camera, address, transform, hub, mouseLook, cameraTransform;
vec3 cameraPosition;
Matrix viewMatrix;
uintptr_t interactCoordinator;
int curItem;
int curItemSerial;
int curAmmo;
void Reset() {
role = -1;
position.Reset();
serverPosition.Reset();
camera = NULL;
address = NULL;
transform = NULL;
hub = NULL;
mouseLook = NULL;
cameraTransform = NULL;
interactCoordinator = NULL;
cameraPosition.Reset();
viewMatrix.Reset();
}
vec3 getPos() {
if (serverPosition == vector3zero)
return position;
return serverPosition;
}
}
struct Door : Entity {
uintptr_t transform, interactable, interactableTransform;
vec3 interactablePosition;
void Reset() {
object = NULL;
position = vector3zero;
transform = NULL;
interactable = NULL;
interactableTransform = NULL;
interactablePosition = vector3zero;
}
Door() {
Reset();
}
float distance() {
if (object == NULL)
return -1;
static vec3 myPos;
myPos = Local::serverPosition;
if (myPos == vector3zero)
myPos = Local::position;
return GetDistance(myPos, interactablePosition);
}
bool valid() {
float dist = distance();
return dist <= 4.69f && dist >= 0;
}
};
Door scpDoor = Door();