-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathPlayerManager.h
More file actions
42 lines (37 loc) · 1.13 KB
/
PlayerManager.h
File metadata and controls
42 lines (37 loc) · 1.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
#pragma once
#define GLM_FORCE_QUAT_DATA_XYZW
#include "glm/glm.hpp"
#include <glm/gtc/type_ptr.hpp>
#include "uevr/API.hpp"
#include "Utilities.h"
#include "SettingsManager.h"
class PlayerManager {
private:
SettingsManager* const settingsManager;
public:
PlayerManager(SettingsManager* sm) : settingsManager(sm) {};
glm::fvec3 actualPlayerPositionUE = { 0.0f, 0.0f, 0.0f };
glm::fvec3 actualPlayerHeadPositionUE = { 0.0f, 0.0f, 0.0f };
const glm::fvec3 defaultPlayerHeadLocalPositionUE = { 0.0f, 0.0f, 69.0f };
const glm::fvec3 defaultBikeLocalOffsetUE = { 0.0f, -35.0f, 0.0f };
uevr::API::UObject* playerController = nullptr;
uevr::API::UObject* playerHead = nullptr;
bool isInControl = false;
bool wasInControl = false;
bool isInVehicle = false;
bool wasInVehicle = false;
enum VehicleType {
OnFoot = 4,
CarOrBoat = 10,
Bike = 13,
Helicopter = 16,
Plane = 19,
};
VehicleType vehicleType = OnFoot;
VehicleType previousVehicleType = OnFoot;
std::string VehicleTypeToString(VehicleType type);
bool shootFromCarInput = false;
bool weaponWheelEnabled = false;
void FetchPlayerUObjects();
void RepositionUnhookedUobjects();
};