Skip to content

Commit

Permalink
IXRTrackingSystem: Remove some redundant structures
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Nov 30, 2023
1 parent 4f2e120 commit c0cb20a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 35 deletions.
4 changes: 2 additions & 2 deletions src/mods/vr/IXRTrackingSystemHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,8 @@ IXRTrackingSystemHook::IXRTrackingSystemHook(FFakeStereoRenderingHook* stereo_ho
}

// GetSystemName
m_xrtracking_vtable[0] = (uintptr_t)+[](void* this_ptr, ue::FName* out) -> ue::FName* {
static ue::FName fake_name{};
m_xrtracking_vtable[0] = (uintptr_t)+[](void* this_ptr, sdk::FName* out) -> sdk::FName* {
static sdk::FName fake_name{};
return &fake_name;
};

Expand Down
10 changes: 0 additions & 10 deletions src/mods/vr/structures/FName.hpp

This file was deleted.

5 changes: 3 additions & 2 deletions src/mods/vr/structures/FXRHMDData.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@

#include "Enums.hpp"
#include "FGuid.hpp"
#include "FName.hpp"

#include <sdk/FName.hpp>

namespace ue4_27 {
#pragma pack(push, 1)
struct FXRHMDData {
bool bValid; // 0x0
char pad_1[0x3];
ue::FName DeviceName; // 0x4
sdk::FName DeviceName; // 0x4
char pad__[0x4];
ue::FGuid ApplicationInstanceID; // 0xc + 4
ue::ETrackingStatus TrackingStatus; // 0x1c + 4
Expand Down
27 changes: 6 additions & 21 deletions src/mods/vr/structures/FXRMotionControllerData.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,33 @@
#include <cstdint>

#include <sdk/Math.hpp>
#include <sdk/FName.hpp>
#include <sdk/StereoStuff.hpp>

#include "Enums.hpp"
#include "FName.hpp"

namespace ue5 {
struct FQuat {
double x{};
double y{};
double z{};
double w{};
};
}

namespace ue4_27 {
struct FQuat {
float x{};
float y{};
float z{};
float w{};
};

struct FXRDeviceId {
ue::FName SystemName{};
sdk::FName SystemName{};
int32_t DeviceID{};
};

#pragma pack(push, 1)
struct FXRMotionControllerData {
bool bValid; // 0x0
char pad_1[0x3];
ue::FName DeviceName; // 0x4
sdk::FName DeviceName; // 0x4
char pad_c[0x10];
uint8_t DeviceVisualType; // 0x1c
ue::EControllerHand HandIndex; // 0x1d
ue::ETrackingStatus TrackingStatus; // 0x1e
char pad_1f[0x1];
glm::vec3 GripPosition; // 0x20
char pad_2c[0x4];
FQuat GripRotation; // 0x30
Quat<float> GripRotation; // 0x30
glm::vec3 AimPosition; // 0x40
char pad_4c[0x4];
FQuat AimRotation; // 0x50
Quat<float> AimRotation; // 0x50
char pad_60[0x30];
char pad_91[0xf];
}; // Size: 0xa0
Expand Down

0 comments on commit c0cb20a

Please sign in to comment.