fix(Vector): Added fvector3

This commit is contained in:
Yimura 2022-01-28 01:15:26 +01:00
parent 17106cd848
commit 61716c5d68
No known key found for this signature in database
GPG Key ID: 3D8FF4397E768682
5 changed files with 24 additions and 7 deletions

View File

@ -1,4 +1,5 @@
#pragma once
#include "vector.hpp"
class CHandlingData
{
@ -10,9 +11,9 @@ public:
float m_downforce_multiplier; //0x0014
float m_popup_light_rotation; //0x0018
char pad_001C[4]; //0x001C
rage::vector3 m_centre_of_mass; //0x0020
rage::fvector3 m_centre_of_mass; //0x0020
char pad_002C[4]; //0x002C
rage::vector3 m_inertia_mult; //0x0030
rage::fvector3 m_inertia_mult; //0x0030
char pad_003C[4]; //0x003C
float m_buoyancy; //0x0040
float m_drive_bias_rear; //0x0044
@ -66,7 +67,7 @@ public:
float m_petrol_tank_volume; //0x0100
float m_oil_volume; //0x0104
char pad_0108[4]; //0x0108
rage::vector3 m_seat_offset_dist; //0x010C
rage::fvector3 m_seat_offset_dist; //0x010C
uint32_t m_monetary_value; //0x0118
char pad_011C[8]; //0x011C
uint32_t m_model_flags; //0x0124

View File

@ -1,4 +1,5 @@
#pragma once
#include "vector.hpp"
class CNavigation
{
@ -7,8 +8,8 @@ public:
float m_heading; //0x0020
float m_heading2; //0x0024
char pad_0028[8]; //0x0028
rage::vector3 m_rotation; //0x0030
rage::fvector3 m_rotation; //0x0030
char pad_003C[24]; //0x003C
rage::vector3 m_position; //0x0054
rage::fvector3 m_position; //0x0054
}; //Size: 0x0060
static_assert(sizeof(CNavigation) == 0x60);

View File

@ -1,4 +1,5 @@
#pragma once
#include "vector.hpp"
namespace rage
{
@ -19,6 +20,6 @@ class CNonPhysicalPlayerData : public rage::nonPhysicalPlayerDataBase
public:
int32_t m_bubble_id; //0x0008
int32_t m_player_id; //0x000C
rage::vector3 m_position; //0x0010
rage::fvector3 m_position; //0x0010
}; //Size: 0x001C
static_assert(sizeof(CNonPhysicalPlayerData) == 0x1C);

View File

@ -4,6 +4,7 @@
#include "CPedWeaponManager.hpp"
#include "CPlayerInfo.hpp"
#include "fwEntity.hpp"
#include "vector.hpp"
#pragma pack(push, 1)
@ -16,7 +17,7 @@ public:
char pad_0284[28]; //0x0284
float m_maxhealth; //0x02A0
char pad_02A4[124]; //0x02A4
rage::vector3 m_velocity; //0x0320
rage::fvector3 m_velocity; //0x0320
char pad_032C[2564]; //0x032C
class CAutomobile *m_vehicle; //0x0D30
char pad_0D38[912]; //0x0D38

13
vector.hpp Normal file
View File

@ -0,0 +1,13 @@
#pragma once
namespace rage
{
template<typename T>
union vector3
{
T data[3];
struct {T x, y, z};
};
typedef vector3<float> fvector3;
}