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

View File

@ -18,24 +18,29 @@
class CPed : public rage::CPhysical class CPed : public rage::CPhysical
{ {
public: public:
char gap30C[20]; char gap2EC[20];
rage::fvector3 m_velocity; //0x0300 rage::fvector3 m_velocity; //0x0300
char pad_032C[260]; //0x030C char pad_030C[260]; //0x030C
class CPedBoneInfo m_bone_info; //0x0410 class CPedBoneInfo m_bone_info; //0x0410
char pad_4A0[2160]; //0x04A0 char pad_04A0[2160]; //0x04A0
class CVehicle *m_vehicle; //0x0D10 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 CPedOxygenInfo* m_oxygen_info; //0x10A0
class CPlayerInfo *m_player_info; //0x10A8 class CPlayerInfo *m_player_info; //0x10A8
class CPedInventory* m_inventory; //0x10B0 class CPedInventory* m_inventory; //0x10B0
class CPedWeaponManager *m_weapon_manager; //0x10B8 class CPedWeaponManager *m_weapon_manager; //0x10B8
char pad_10C0[892]; //0x10C0 char pad_10C0[892]; //0x10C0
uint8_t m_seatbelt; //0x143C 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 uint8_t m_ped_task_flag; //0x144B
char pad_146C[192]; //0x144C char pad_144C[192]; //0x144C
float m_armor; //0x150C float m_armor; //0x150C
}; //Size: 0x1510 char pad_1510[260]; //0x1510
static_assert(sizeof(CPed) == 0x1510); int m_cash; //0x1614
}; //Size: 0x1618
static_assert(sizeof(CPed) == 0x1618);
#pragma pack(pop) #pragma pack(pop)

View File

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