feat: CPhysical, CPed & CVehicle(#57)

* CPhysical added CAttackers class
* CPed added m_can_switch_weapon & m_cash
* CVehicle added m_door_lock_status

Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
This commit is contained in:
Aure7138 2022-11-07 06:29:08 +08:00 committed by GitHub
parent e146647ee4
commit 5b1210b143
4 changed files with 322 additions and 301 deletions

15
entities/CAttackers.hpp Normal file
View File

@ -0,0 +1,15 @@
#pragma once
class CPed; //fwdec
#pragma pack(push, 1)
class CAttackers
{
public:
CPed* m_attacker0; //0x0000
char pad_0x0008[0x10]; //0x0008
CPed* m_attacker1; //0x0018
char pad_0x0020[0x10]; //0x0020
CPed* m_attacker2; //0x0030
}; //Size=0x0038
#pragma pack(pop)

View File

@ -1,6 +1,7 @@
#pragma once
#include "CDynamicEntity.hpp"
#include "CAttackers.hpp"
#include <cstdint>
@ -20,8 +21,8 @@ namespace rage
uint32_t dword194;
char gap198[232];
float m_health; //0x0280
float m_maxhealth; //0x02A0
uint64_t qword2A8;
float m_maxhealth; //0x0284
class CAttackers* m_attackers;
char gap2B0[72];
uint64_t qword2F8;
uint64_t qword300;

View File

@ -18,24 +18,29 @@
class CPed : public rage::CPhysical
{
public:
char gap30C[20];
char gap2EC[20];
rage::fvector3 m_velocity; //0x0300
char pad_032C[260]; //0x030C
char pad_030C[260]; //0x030C
class CPedBoneInfo m_bone_info; //0x0410
char pad_4A0[2160]; //0x04A0
char pad_04A0[2160]; //0x04A0
class CVehicle *m_vehicle; //0x0D10
char pad_0D38[904]; //0x0D18
char pad_0D18[896]; //0x0D18
uint32_t m_ped_type; //0x1098
char pad_109C[4]; //0x109C
class CPedOxygenInfo* m_oxygen_info; //0x10A0
class CPlayerInfo *m_player_info; //0x10A8
class CPedInventory* m_inventory; //0x10B0
class CPedWeaponManager *m_weapon_manager; //0x10B8
char pad_10C0[892]; //0x10C0
uint8_t m_seatbelt; //0x143C
char pad_143D[14]; //0x143D
char pad_143D[13]; //0x143D
uint8_t m_can_switch_weapon; //0x144A
uint8_t m_ped_task_flag; //0x144B
char pad_146C[192]; //0x144C
char pad_144C[192]; //0x144C
float m_armor; //0x150C
}; //Size: 0x1510
static_assert(sizeof(CPed) == 0x1510);
char pad_1510[260]; //0x1510
int m_cash; //0x1614
}; //Size: 0x1618
static_assert(sizeof(CPed) == 0x1618);
#pragma pack(pop)

View File

@ -9,322 +9,322 @@
class CVehicle : public rage::CPhysical
{
public:
char gap30C[4];
uint32_t dword310;
uint32_t dword314;
uint8_t m_boost_state; // 0x318
char gap319[2];
uint8_t m_boost_allow_recharge; // 0x31B
uint16_t word31C;
char gap31E[2];
float m_boost; // 0x320
float m_rocket_recharge_speed; // 0x324
uint32_t dword328;
uint8_t byte32C;
char gap32D[3];
uint8_t byte330;
char gap331[3];
char gap2EC[4];
uint32_t dword2F0;
uint32_t dword2F4;
uint8_t m_boost_state; // 0x2F8
char gap2F9[2];
uint8_t m_boost_allow_recharge; // 0x2FB
uint16_t word2FC;
char gap2FE[2];
float m_boost; // 0x300
float m_rocket_recharge_speed; // 0x304
uint32_t dword308;
uint8_t byte30C;
char gap30D[3];
uint8_t byte310;
char gap311[3];
uint64_t qword314;
uint32_t dword31C;
uint8_t byte320;
char gap321[3];
uint32_t dword324;
uint8_t byte328;
char gap329[3];
uint64_t qword32C;
uint64_t qword334;
uint32_t dword33C;
uint8_t byte340;
char gap341[3];
uint32_t dword344;
uint8_t byte348;
char gap349[3];
uint64_t qword34C;
uint64_t qword354;
uint64_t qword35C;
uint64_t qword364;
uint32_t dword36C;
uint64_t qword33C;
uint64_t qword344;
uint32_t dword34C;
uint32_t dword350;
uint8_t byte354;
uint16_t word355;
uint8_t byte357;
uint64_t qword358;
uint64_t qword360;
uint64_t qword368;
uint32_t dword370;
uint8_t byte374;
uint16_t word375;
uint8_t byte377;
uint64_t qword378;
uint64_t qword380;
uint64_t qword388;
uint32_t dword390;
uint32_t dword394;
uint8_t byte398;
char gap399[3];
uint64_t qword39C;
uint64_t qword3A4;
char gap3AC[4];
float m_jump_boost_charge; // 0x3B0
uint8_t byte3B4;
char gap3B5[3];
uint64_t qword3B8;
uint32_t dword3C0;
uint32_t dword3C4;
char gap3C8[8];
uint32_t dword374;
uint8_t byte378;
char gap379[3];
uint64_t qword37C;
uint64_t qword384;
char gap38C[4];
float m_jump_boost_charge; // 0x390
uint8_t byte394;
char gap395[3];
uint64_t qword398;
uint32_t dword3A0;
uint32_t dword3A4;
char gap3A8[8];
uint16_t oword3B0;
char gap3B2[30];
uint16_t oword3D0;
char gap3D2[30];
uint16_t oword3F0;
char gap3F2[14];
uint32_t dword400;
uint64_t qword404;
char gap40C[4];
uint32_t dword410;
uint64_t qword414;
char gap41C[4];
uint64_t qword420;
uint32_t dword428;
uint32_t dword42C;
char gap430[1032];
uint64_t qword838;
float m_body_health; // 0x840
float m_petrol_tank_health; // 0x844
char gap848[12];
float float854;
char gap858[176];
float m_engine_health; // 0x908
char gap90C[44];
CHandlingData* m_handling_data; // 0x938
char gap940[2];
uint8_t m_is_drivable; //0x0942
uint8_t m_tyres_can_burst; //0x0943
uint8_t m_deform_god; //0x0944
char gap945[6];
uint8_t byte94B;
char gap94C;
uint8_t byte94D;
char gap94E;
uint8_t byte94F;
char gap950[3];
uint8_t byte953;
uint8_t byte954;
char gap955;
uint8_t byte956;
uint8_t byte957;
char gap958[2];
uint8_t byte95A;
char gap95B[9];
uint64_t qword964;
char gap96C[4];
uint64_t qword970;
char gap3D2[14];
uint32_t dword3E0;
uint64_t qword3E4;
char gap3EC[4];
uint32_t dword3F0;
uint64_t qword3F4;
char gap3FC[4];
uint64_t qword400;
uint32_t dword408;
uint32_t dword40C;
char gap410[1032];
uint64_t qword818;
float m_body_health; // 0x820
float m_petrol_tank_health; // 0x824
char gap828[12];
float float834;
char gap838[176];
float m_engine_health; // 0x8E8
char gap8EC[44];
CHandlingData* m_handling_data; // 0x918
char gap920[2];
uint8_t m_is_drivable; //0x0922
uint8_t m_tyres_can_burst; //0x0923
uint8_t m_deform_god; //0x0924
char gap925[6];
uint8_t byte92B;
char gap92C;
uint8_t byte92D;
char gap92E;
uint8_t byte92F;
char gap930[3];
uint8_t byte933;
uint8_t byte934;
char gap935;
uint8_t byte936;
uint8_t byte937;
char gap938[2];
uint8_t byte93A;
char gap93B[9];
uint64_t qword944;
char gap94C[4];
uint64_t qword950;
uint64_t qword958;
char gap960[8];
uint64_t qword968;
uint16_t word970;
uint32_t dword972;
uint16_t word976;
uint64_t qword978;
char gap980[8];
uint64_t qword988;
uint16_t word990;
uint32_t dword992;
uint16_t word996;
uint64_t qword998;
uint64_t qword9A0;
uint64_t qword980;
uint32_t dword988;
uint64_t qword98C;
uint64_t qword994;
uint64_t qword99C;
uint16_t word9A4;
uint8_t byte9A6;
char gap9A7;
uint32_t dword9A8;
uint64_t qword9AC;
uint64_t qword9B4;
uint64_t qword9BC;
uint16_t word9C4;
uint8_t byte9C6;
char gap9C7;
uint32_t dword9C8;
uint8_t byte9CC;
char gap9CD;
uint16_t word9CE;
uint16_t word9D0;
char gap9D2[2];
uint32_t dword9D4;
char gap9D8[8];
uint32_t dword9E0;
uint64_t qword9E4;
uint32_t dword9EC;
uint8_t byte9AC;
char gap9AD;
uint16_t word9AE;
uint16_t word9B0;
char gap9B2[2];
uint32_t dword9B4;
char gap9B8[8];
uint32_t dword9C0;
uint64_t qword9C4;
uint32_t dword9CC;
uint32_t dword9D0;
char gap9D4[4];
float m_dirt_level; // 0x9D8
uint32_t dword9DC;
uint64_t qword9E0;
uint64_t qword9E8;
uint32_t dword9F0;
char gap9F4[4];
float m_dirt_level; // 0x9F8
uint32_t dword9F4;
uint8_t byte9F8;
uint16_t word9F9;
uint8_t byte9FB;
uint32_t dword9FC;
uint64_t qwordA00;
uint64_t qwordA08;
uint32_t dwordA10;
uint32_t dwordA14;
uint8_t byteA18;
uint16_t wordA19;
uint8_t byteA1B;
uint32_t dwordA1C;
uint32_t dwordA08;
uint32_t dwordA0C;
uint64_t qwordA10;
uint64_t qwordA18;
uint64_t qwordA20;
uint32_t dwordA28;
uint32_t dwordA2C;
uint64_t qwordA30;
uint64_t qwordA28;
uint8_t byteA30;
char gapA31[7];
uint64_t qwordA38;
uint64_t qwordA40;
uint64_t qwordA48;
uint8_t byteA50;
char gapA51[7];
uint64_t qwordA58;
uint32_t dwordA48;
uint32_t dwordA4C;
uint32_t dwordA50;
uint32_t dwordA54;
uint32_t dwordA58;
uint32_t dwordA5C;
uint64_t qwordA60;
uint32_t dwordA68;
uint32_t dwordA6C;
uint32_t dwordA70;
uint32_t dwordA74;
uint32_t dwordA78;
uint32_t dwordA7C;
uint64_t qwordA80;
uint8_t byteA88;
char gapA89;
uint16_t wordA8A;
uint64_t qwordA8C;
uint64_t qwordA94;
uint64_t qwordA9C;
uint64_t qwordAA4;
uint32_t dwordAAC;
uint16_t wordAB0;
uint16_t wordAB2;
uint8_t byteAB4;
uint16_t wordAB5;
uint16_t wordAB7;
char gapAB9[2];
char gapABB[3]; // start of some kind of flag, default value 0x1000000i64
uint8_t m_is_targetable; // 0xABE
char gapABF[4]; // end of some kind of flag
uint32_t dwordAC3;
uint32_t dwordAC7;
uint16_t wordACB;
uint8_t byteACD;
uint8_t byteACE;
char gapACF;
uint64_t qwordAD0;
uint64_t qwordAD8;
uint8_t byteAE0;
char gapAE1[3];
uint32_t dwordAE4;
uint32_t dwordAE8;
uint32_t dwordAEC;
uint8_t byteA68;
char gapA69;
uint16_t wordA6A;
uint64_t qwordA6C;
uint64_t qwordA74;
uint64_t qwordA7C;
uint64_t qwordA84;
uint32_t dwordA8C;
uint16_t wordA90;
uint16_t wordA92;
uint8_t byteA94;
uint16_t wordA95;
uint16_t wordA97;
char gapA99[2];
char gapA9B[3]; // start of some kind of flag, default value 0x1000000i64
uint8_t m_is_targetable; // 0xA9E
char gapA9F[4]; // end of some kind of flag
uint32_t dwordAA3;
uint32_t dwordAA7;
uint16_t wordAAB;
uint8_t byteAAD;
uint8_t byteAAE;
char gapAAF;
uint64_t qwordAB0;
uint64_t qwordAB8;
uint8_t byteAC0;
char gapAC1[3];
uint32_t dwordAC4;
uint32_t dwordAC8;
uint32_t dwordACC;
uint32_t dwordAD0;
char gapAD4[4];
uint32_t dwordAD8;
char gapADC[20];
uint32_t dwordAF0;
char gapAF4[4];
uint32_t dwordAF8;
char gapAFC[20];
uint32_t dwordAF4;
char gapAF8[24];
uint32_t dwordB10;
uint32_t dwordB14;
char gapB18[24];
uint32_t dwordB30;
uint64_t qwordB34;
char gapB3C[4];
uint32_t dwordB40;
uint64_t qwordB44;
char gapB4C[4];
uint16_t owordB50;
char gapB52[14];
uint16_t owordB60;
char gapB62[14];
uint64_t qwordB14;
char gapB1C[4];
uint32_t dwordB20;
uint64_t qwordB24;
char gapB2C[4];
uint16_t owordB30;
char gapB32[14];
uint16_t owordB40;
char gapB42[14];
uint32_t dwordB50;
uint32_t dwordB54;
uint64_t qwordB58;
uint32_t dwordB60;
uint32_t dwordB64;
uint32_t dwordB68;
uint32_t dwordB6C;
uint32_t dwordB70;
uint32_t dwordB74;
uint64_t qwordB78;
uint32_t dwordB78;
uint32_t dwordB7C;
uint32_t dwordB80;
uint32_t dwordB84;
uint32_t dwordB88;
uint32_t dwordB8C;
uint64_t qwordB84;
char gapB8C[4];
uint32_t dwordB90;
uint32_t dwordB94;
uint32_t dwordB98;
uint32_t dwordB9C;
uint32_t dwordBA0;
uint64_t qwordBA4;
char gapBAC[4];
uint32_t dwordBB0;
uint64_t qwordBB4;
char gapBBC[20];
uint64_t qwordB94;
char gapB9C[20];
uint64_t qwordBB0;
char gapBB8[16];
uint32_t dwordBC8;
char gapBCC[4];
uint64_t qwordBD0;
char gapBD8[16];
uint32_t dwordBE8;
char gapBEC[4];
uint64_t qwordBF0;
uint32_t dwordBF8;
uint32_t dwordBD8;
uint64_t qwordBDC;
uint16_t wordBE4;
uint8_t byteBE6;
char gapBE7;
uint64_t qwordBE8;
uint32_t dwordBF0;
uint32_t dwordBF4;
uint16_t wordBF8;
char gapBFA[2];
uint64_t qwordBFC;
uint16_t wordC04;
uint8_t byteC06;
char gapC07;
uint64_t qwordC08;
uint32_t dwordC10;
uint32_t dwordC14;
uint16_t wordC18;
char gapC1A[2];
uint64_t qwordC1C;
uint64_t qwordC24;
uint64_t qwordC2C;
uint64_t qwordC34;
char gapC3C[4];
uint64_t qwordC40;
uint64_t qwordC48;
uint32_t dwordC50;
char gapC54[4];
uint32_t dwordC58;
float m_gravity; // 0xC5C - might be start of some sub-class
char gapC60[8];
class CPed* m_driver; //0x0C68
class CPed* m_passengers[15]; //0x0C70
class CPed* m_last_driver; //0x0CE8
char gapCF0[1424]; // end of sub-class
uint32_t dword1280;
char gap1284[4];
uint32_t dword1288;
char gap128C[12];
uint16_t word1298;
uint8_t byte129A;
char gap129B;
uint64_t qword129C;
uint64_t qword12A4;
uint64_t qword12AC;
uint64_t qword12B4;
char gap12BC[4];
uint64_t qword12C0;
uint64_t qwordC04;
uint64_t qwordC0C;
uint64_t qwordC14;
char gapC1C[4];
uint64_t qwordC20;
uint64_t qwordC28;
uint32_t dwordC30;
char gapC34[4];
uint32_t dwordC38;
float m_gravity; // 0xC3C - might be start of some sub-class
char gapC40[8];
class CPed* m_driver; //0x0C48
class CPed* m_passengers[15]; //0x0C50
class CPed* m_last_driver; //0x0CC8
char gapCD0[1424]; // end of sub-class
uint32_t dword1260;
char gap1264[4];
uint32_t dword1268;
char gap126C[12];
uint16_t word1278;
uint8_t byte127A;
char gap127B;
uint64_t qword127C;
uint64_t qword1284;
uint64_t qword128C;
uint64_t qword1294;
char gap129C[4];
uint64_t qword12A0;
uint64_t qword12A8;
uint16_t word12B0;
char gap12B2[14];
uint32_t dword12C0;
uint32_t dword12C4;
uint64_t qword12C8;
uint16_t word12D0;
char gap12D2[14];
uint32_t dword12E0;
uint32_t dword12E4;
uint64_t qword12E8;
uint32_t dword12F0;
char gap12F4[4];
uint64_t qword12F8;
char gap1300[56];
uint64_t qword1338;
uint64_t qword1340;
uint32_t dword12D0;
char gap12D4[4];
uint64_t qword12D8;
char gap12E0[56];
uint64_t qword1318;
uint64_t qword1320;
uint32_t dword1328;
uint32_t dword132C;
uint32_t dword1330;
uint64_t qword1334;
uint32_t dword133C;
uint32_t dword1340;
uint32_t dword1344;
uint32_t dword1348;
uint32_t dword134C;
uint32_t dword1350;
uint64_t qword1354;
uint32_t dword135C;
uint32_t dword1360;
uint32_t dword1364;
uint32_t dword1368;
char gap136C[4];
float float1370;
float float1374;
char gap1378[8];
uint64_t qword1380;
uint64_t qword1388;
uint32_t dword1390;
char gap134C[4];
float float1350;
float float1354;
char gap1358[8];
uint64_t qword1360;
uint64_t qword1368;
uint32_t m_door_lock_status;
uint64_t qword1374;
uint16_t word137C;
uint16_t word137E;
uint8_t byte1380;
uint16_t word1381;
char gap1383[2];
uint8_t byte1385;
uint16_t word1386;
uint8_t byte1388;
char gap1389[3];
uint32_t dword138C;
uint8_t byte1390;
char gap1391[3];
uint64_t qword1394;
uint16_t word139C;
uint16_t word139E;
uint8_t byte13A0;
uint16_t word13A1;
char gap13A3[2];
uint8_t byte13A5;
uint16_t word13A6;
uint8_t byte13A8;
char gap13A9[3];
uint32_t dword13AC;
uint8_t byte13B0;
char gap13B1[3];
uint64_t qword13B4;
uint32_t dword139C;
uint32_t dword13A0;
uint32_t dword13A4;
uint32_t dword13A8;
uint8_t byte13AC;
char gap13AD[3];
uint64_t qword13B0;
uint8_t byte13B8;
char gap13B9[3];
uint32_t dword13BC;
uint32_t dword13C0;
uint32_t dword13C4;
char gap13C0[8];
uint32_t dword13C8;
uint8_t byte13CC;
char gap13CD[3];
uint64_t qword13D0;
uint8_t byte13D8;
char gap13D9[3];
uint32_t dword13DC;
char gap13E0[8];
uint32_t dword13E8;
char gap13EC[116];
uint32_t dword1460;
uint16_t word1464;
uint8_t byte1466;
char gap1467;
uint64_t qword1468;
char gap13CC[116];
uint32_t dword1440;
uint16_t word1444;
uint8_t byte1446;
char gap1447;
uint64_t qword1448;
};
static_assert(sizeof(CVehicle) == 0x1450);
#pragma pack(pop)