-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayer.hpp
More file actions
63 lines (56 loc) · 2.13 KB
/
Player.hpp
File metadata and controls
63 lines (56 loc) · 2.13 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
#pragma once
#include <numbers>
#include "ProfileInfo.hpp"
#include "InventoryController.hpp"
#include <raylib.h>
#include <array>
#include "Bones.hpp"
#include <map>
#include <optional>
#include "FirearmController.hpp"
const int BONE_PATH_SIZE = 21;
class Player {
public:
Player(uintptr_t address);
ProfileInfo GetProfileInfo();
uintptr_t GetSkeletonTransformListValues();
Vector3 GetPosition();
Vector3 GetBone(EBone bone);
void DrawBones(float alpha, ProfileInfo& localPlayerInfo);
Color GetColor(ProfileInfo inRelationTo);
InventoryController GetInventoryController();
FirearmController GetFirearmController();
uintptr_t address;
float distance;
float distance2d;
bool isInImportantRange;
private:
std::map<EBone, uintptr_t> cachedBones;
std::optional<ProfileInfo> cachedProfileInfo = std::nullopt;
uintptr_t cachedEFTPlayerClassAddress;
uintptr_t cachedTransformAddress;
std::optional<InventoryController> cachedInventoryController = std::nullopt;
std::optional<Color> cachedColor = std::nullopt;
inline static const std::array<std::array<EBone, 2>, BONE_PATH_SIZE> drawPaths
{
std::array<EBone, 2>{EBone::Pelvis, EBone::Spine1},
std::array<EBone, 2>{EBone::Spine1, EBone::Spine2},
std::array<EBone, 2>{EBone::Spine2, EBone::Spine3},
std::array<EBone, 2>{EBone::Spine3, EBone::Neck},
std::array<EBone, 2>{EBone::Neck, EBone::Head},
std::array<EBone, 2>{EBone::Neck, EBone::RUpperArm},
std::array<EBone, 2>{EBone::RUpperArm, EBone::RForearm1},
std::array<EBone, 2>{EBone::RForearm1, EBone::RForearm3},
std::array<EBone, 2>{EBone::Neck, EBone::LUpperArm},
std::array<EBone, 2>{EBone::LUpperArm, EBone::LForearm1},
std::array<EBone, 2>{EBone::LForearm1, EBone::LForearm3},
std::array<EBone, 2>{EBone::Pelvis, EBone::LThigh1},
std::array<EBone, 2>{EBone::Pelvis, EBone::RThigh1},
std::array<EBone, 2>{EBone::RThigh1, EBone::RThigh2},
std::array<EBone, 2>{EBone::RThigh2, EBone::RCalf},
std::array<EBone, 2>{EBone::RCalf, EBone::RFoot},
std::array<EBone, 2>{EBone::LThigh1, EBone::LThigh2},
std::array<EBone, 2>{EBone::LThigh2, EBone::LCalf},
std::array<EBone, 2>{EBone::LCalf, EBone::LFoot},
};
};