Class Optimizations (#34)

This commit is contained in:
Ryan 2024-08-07 23:01:07 -04:00 committed by GitHub
parent ad824270b9
commit fe55483cea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 31 deletions

View File

@ -1,30 +1,18 @@
#pragma once
#include <cstdint>
#include "rage/vector.hpp"
#include <cstdint>
struct CProjectileCreationData
{
uint16_t unk_0000;
struct CProjectileCreationData {
char m_Pad1[2];
uint16_t m_OwnerObjectId;
uint32_t m_AmmoHash;
uint32_t m_WeaponHash;
uint32_t unk_000C;
rage::vector3 m_Vector;
uint32_t unk_0020;
char m_Pad2[4];
rage::vector3 m_Velocity;
char m_Pad3[4];
uint16_t m_ObjectId2;
char pad_0026[2];
bool unk_0028;
char pad_0029[3];
uint32_t unk_002C;
bool pad_0030;
bool unk_0031;
char pad_0032[2];
float unk_0034;
bool unk_0038;
bool unk_0039;
bool unk_003A;
bool unk_003B;
char pad_003C[4];
rage::matrix34 m_Matrix;
char m_Pad4[26];
rage::matrix34 m_InitialPosition;
};
static_assert(sizeof(CProjectileCreationData) == 0x80);

View File

@ -1,8 +1,7 @@
#pragma once
#include <cstdint>
class CGadgetData
{
class CGadgetData {
public:
uint32_t m_Type;
uint8_t m_Data[0xF3];
@ -10,8 +9,7 @@ public:
static_assert(sizeof(CGadgetData) == 0xF8);
// TODO: Fix this
class CVehicleGadgetDataNode
{
class CVehicleGadgetData {
public:
bool m_HasPosition;
char pad_0001[15];
@ -20,4 +18,4 @@ public:
char pad_0002[12];
CGadgetData m_Gadgets[2];
};
static_assert(sizeof(CVehicleGadgetDataNode) == 0x220);
static_assert(sizeof(CVehicleGadgetData) == 0x220);