diff --git a/CHandlingData.hpp b/CHandlingData.hpp index 56d8b39..0e93756 100644 --- a/CHandlingData.hpp +++ b/CHandlingData.hpp @@ -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 diff --git a/CNavigation.hpp b/CNavigation.hpp index 061f5af..55cbcde 100644 --- a/CNavigation.hpp +++ b/CNavigation.hpp @@ -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); diff --git a/CNonPhysicalPlayerData.hpp b/CNonPhysicalPlayerData.hpp index 918325e..2664c10 100644 --- a/CNonPhysicalPlayerData.hpp +++ b/CNonPhysicalPlayerData.hpp @@ -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); diff --git a/CPed.hpp b/CPed.hpp index 162033a..b29a434 100644 --- a/CPed.hpp +++ b/CPed.hpp @@ -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 diff --git a/vector.hpp b/vector.hpp new file mode 100644 index 0000000..2c81e1a --- /dev/null +++ b/vector.hpp @@ -0,0 +1,13 @@ +#pragma once + +namespace rage +{ + template + union vector3 + { + T data[3]; + struct {T x, y, z}; + }; + + typedef vector3 fvector3; +}