-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstructs.hpp
More file actions
84 lines (72 loc) · 1.66 KB
/
structs.hpp
File metadata and controls
84 lines (72 loc) · 1.66 KB
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
#pragma once
#include <cmath>
struct vec3
{
float x, y, z;
inline auto magnitude()
{
return std::sqrtf((x * x) + (y * y) + (z * z));
}
inline auto operator-(const vec3& other)
{
return vec3{ x - other.x, y - other.y, z - other.z };
}
};
void calc_angle(vec3 src, vec3 dst, float& yaw, float& pitch)
{
float deltaX = dst.x - src.x;
float deltaY = dst.y - src.y;
float deltaZ = dst.z - src.z;
float hypotenuse = sqrt(deltaX * deltaX + deltaY * deltaY);
const float PI = 3.141592653589793f;
yaw = atan2(deltaY, deltaX) * (180.0f / PI) + 90.0f;
pitch = atan2(-deltaZ, hypotenuse) * (180.0f / PI);
}
enum class player_state_t : int32_t
{
alive = 0,
dead = 1
};
class weapon
{
public:
char pad_0000[8];
class player_entity* owner;
};
class entity_list
{
public:
char pad_0000[4];
class entity* entities[31];
};
// Created with ReClass.NET 1.2 by KN4CK3R
class entity
{
public:
uintptr_t vtable; //0x0000
vec3 head_pos; //0x0004
vec3 accel; //0x0010
vec3 vel; //0x001C
char pad_0028[12]; //0x0028
float yaw; //0x0034
float pitch; //0x0038
char pad_003C[4]; //0x003C
float wep_kickback; //0x0040
char pad_0044[164]; //0x0044
player_state_t player_state;
int32_t health; //0x00EC
char pad_00F0[60]; //0x00F0
int32_t pistol_ammo; //0x012C
int32_t carbine_ammo; //0x0130
int32_t shotgun_ammo; //0x0134
int32_t machinegun_ammo; //0x0138
int32_t sniper_ammo; //0x013C
int32_t rifle_ammo; //0x0140
int32_t grenade_count; //0x0144
char pad_0148[4]; //0x0148
int32_t knife_cooldown; //0x014C
char pad_0150[24]; //0x0150
int32_t grenade_cooldown; //0x0168
char pad_016C[416]; //0x016C
int32_t team; //0x030C
}; //Size: 0x0454