Fix netObject. (#187)

* Fix netObject.

* Fixed m_object_id being incorrectly typed.

* Updated CVehicle.
This commit is contained in:
gir489 2024-08-17 05:03:45 -04:00 committed by GitHub
parent 188962ac5d
commit 3f5df576ad
3 changed files with 34 additions and 15 deletions

Binary file not shown.

View File

@ -13,16 +13,17 @@ namespace rage
public:
int16_t m_object_type; //0x0008
int16_t m_object_id; //0x000A
char pad_000C[61]; //0x000C
char pad_000C[52]; //0x000C
int8_t m_bubble; //0x0040
char pad_0041[8]; //0x0041
int8_t m_owner_id; //0x0049
int8_t m_control_id; //0x004A
int8_t m_next_owner_id; //0x004B
bool m_is_remote; //0x004C
bool m_wants_to_delete; //0x004D
char pad_004E[1]; //0x004E
bool m_should_not_be_delete; //0x004F
char pad_0050[0x38]; //0x0050
int m_ownership_token; //0x0088
int8_t m_wants_to_be_owner; //0x004A
bool m_is_remote; //0x004B
uint16_t m_flags_one; //0x004C
uint16_t m_flags_two; //0x004E
class CObject* m_game_object; //0x0050
char pad_0058[48]; //0x0058
uint32_t m_ownership_token; //0x0088
DEFINE_RAGE_RTTI(rage::netObject)
@ -131,7 +132,7 @@ namespace rage
virtual void m_318() = 0;
virtual void m_320() = 0;
virtual void UpdatePendingVisibilityChanges() = 0;
}; //Size: 0x0050
static_assert(sizeof(netObject) == 0x8C); // incorrect, but will do for now
}; //Size: 0x008C
static_assert(sizeof(netObject) == 0x8C);
}
#pragma pack(pop)

View File

@ -7,6 +7,26 @@
#include <cmath>
#pragma pack(push, 1)
class CDeformation
{
public:
char pad_0000[732]; //0x0000
}; //Size: 0x02DC
static_assert(sizeof(CDeformation) == 0x2DC);
class CVehicleDamage
{
public:
char pad_0000[16]; //0x0000
class CDeformation m_deformation; //0x0010
char pad_02EC[284]; //0x02EC
class CVehicle* m_vehicle; //0x0408
float m_body_health; //0x0410
float m_petrol_tank_health; //0x0414
}; //Size: 0x0418
static_assert(sizeof(CVehicleDamage) == 0x418);
class CVehicle : public rage::CPhysical
{
public:
@ -20,9 +40,8 @@ public:
char pad_0308[152]; //0x0308
float m_jump_boost_charge; //0x03A0
bool m_can_boost_jump; //0x03A4
char pad_03A5[1163]; //0x03A5
float m_body_health; //0x0830
float m_petrol_tank_health; //0x0834
char pad_03A5[123]; //0x03A5
class CVehicleDamage m_vehicle_damage; //0x0420
char pad_0838[72]; //0x0838
int16_t m_next_gear; //0x0880
int16_t m_current_gear; //0x0882
@ -57,7 +76,6 @@ public:
char pad_0D20[1696]; //0x0D20
uint32_t m_door_lock_status; //0x13C0
char pad_13C4[2356]; //0x13C4
}; //Size: 0x1CF8
static_assert(sizeof(CVehicle) == 0x1CF8);
#pragma pack(pop)