From 7ff6c9b9b724d643c7a7682bc7d2b0d3b7bc94d3 Mon Sep 17 00:00:00 2001 From: Yimura Date: Mon, 6 Dec 2021 19:36:09 +0100 Subject: [PATCH] feat(Project): Copy pastable into BigBaseV2 source --- CAmmoInfo.h => CAmmoInfo.hpp | 32 ++++++++++-------- CAutomobile.h => CAutomobile.hpp | 23 +++++++------ CHandlingData.h => CHandlingData.hpp | 2 ++ CNetGamePlayer.h | 9 ----- CNetGamePlayer.hpp | 18 ++++++++++ CPed.h => CPed.hpp | 25 ++++++++------ CPedFactory.h => CPedFactory.hpp | 5 +-- CPedModelInfo.h => CPedModelInfo.hpp | 2 ++ CPedWeaponManager.h => CPedWeaponManager.hpp | 9 ++--- CPlayerInfo.h => CPlayerInfo.hpp | 28 ++++++++++++--- ...leDrawHandler.h => CVehicleDrawHandler.hpp | 2 ++ CVehicleModelInfo.h => CVehicleModelInfo.hpp | 2 ++ CWeaponInfo.h => CWeaponInfo.hpp | 5 +-- gtav.rcnet | Bin 10727 -> 10727 bytes pgBase.h => pgBase.hpp | 2 ++ 15 files changed, 107 insertions(+), 57 deletions(-) rename CAmmoInfo.h => CAmmoInfo.hpp (96%) rename CAutomobile.h => CAutomobile.hpp (73%) rename CHandlingData.h => CHandlingData.hpp (99%) delete mode 100644 CNetGamePlayer.h create mode 100644 CNetGamePlayer.hpp rename CPed.h => CPed.hpp (70%) rename CPedFactory.h => CPedFactory.hpp (63%) rename CPedModelInfo.h => CPedModelInfo.hpp (91%) rename CPedWeaponManager.h => CPedWeaponManager.hpp (58%) rename CPlayerInfo.h => CPlayerInfo.hpp (75%) rename CVehicleDrawHandler.h => CVehicleDrawHandler.hpp (99%) rename CVehicleModelInfo.h => CVehicleModelInfo.hpp (92%) rename CWeaponInfo.h => CWeaponInfo.hpp (92%) rename pgBase.h => pgBase.hpp (90%) diff --git a/CAmmoInfo.h b/CAmmoInfo.hpp similarity index 96% rename from CAmmoInfo.h rename to CAmmoInfo.hpp index 98ac643..f25937f 100644 --- a/CAmmoInfo.h +++ b/CAmmoInfo.hpp @@ -1,15 +1,17 @@ -class CAmmoInfo -{ -public: - char pad_0000[12]; //0x0000 - uint32_t m_projectile_type; //0x000C - uint32_t m_ammo_name_hash; //0x0010 - uint32_t m_ammo_model_hash; //0x0014 - char pad_0018[16]; //0x0018 - uint32_t m_max_ammo; //0x0028 - char pad_002C[44]; //0x002C - float m_missile_speed; //0x0058 - char pad_005C[284]; //0x005C - uint32_t m_lock_on_time; //0x0178 -}; //Size: 0x017C -static_assert(sizeof(CAmmoInfo) == 0x17C); +#pragma once + +class CAmmoInfo +{ +public: + char pad_0000[12]; //0x0000 + uint32_t m_projectile_type; //0x000C + uint32_t m_ammo_name_hash; //0x0010 + uint32_t m_ammo_model_hash; //0x0014 + char pad_0018[16]; //0x0018 + uint32_t m_max_ammo; //0x0028 + char pad_002C[44]; //0x002C + float m_missile_speed; //0x0058 + char pad_005C[284]; //0x005C + uint32_t m_lock_on_time; //0x0178 +}; //Size: 0x017C +static_assert(sizeof(CAmmoInfo) == 0x17C); diff --git a/CAutomobile.h b/CAutomobile.hpp similarity index 73% rename from CAutomobile.h rename to CAutomobile.hpp index 405528b..1b84c30 100644 --- a/CAutomobile.h +++ b/CAutomobile.hpp @@ -1,17 +1,18 @@ -#include "CHandlingData.h" -#include "CVehicleDrawHandler.h" -#include "CVehicleModelInfo.h" -#include "pgBase.h" +#pragma once +#include "CHandlingData.hpp" +#include "CVehicleDrawHandler.hpp" +#include "CVehicleModelInfo.hpp" +#include "pgBase.hpp" class CAutomobile { public: char pad_0000[32]; //0x0000 - class CVehicleModelInfo *m_vehicle_model; //0x0020 + class CVehicleModelInfo* m_vehicle_model; //0x0020 char pad_0028[8]; //0x0028 - class pgBase *m_posbase; //0x0030 + class pgBase* m_posbase; //0x0030 char pad_0038[16]; //0x0038 - class CVehicleDrawHandler *m_mods; //0x0048 + class CVehicleDrawHandler* m_mods; //0x0048 char pad_0050[313]; //0x0050 uint8_t m_godmode; //0x0189 char pad_018A[246]; //0x018A @@ -33,7 +34,7 @@ public: char pad_0848[192]; //0x0848 float m_engine_health; //0x0908 char pad_090C[44]; //0x090C - class CHandlingData *m_handling; //0x0938 + class CHandlingData* m_handling; //0x0938 char pad_0940[2]; //0x0940 uint8_t m_is_drivable; //0x0942 uint8_t m_tyres_can_burst; //0x0943 @@ -45,8 +46,8 @@ public: char pad_0ABF[413]; //0x0ABF float m_gravity; //0x0C5C char pad_0C60[8]; //0x0C60 - class CPed *m_driver; //0x0C68 - class CPed *m_passengers[15]; //0x0C70 - class CPed *m_last_driver; //0x0CE8 + class CPed* m_driver; //0x0C68 + class CPed* m_passengers[15]; //0x0C70 + class CPed* m_last_driver; //0x0CE8 }; //Size: 0x0CF0 static_assert(sizeof(CAutomobile) == 0xCF0); diff --git a/CHandlingData.h b/CHandlingData.hpp similarity index 99% rename from CHandlingData.h rename to CHandlingData.hpp index f8fc90f..56d8b39 100644 --- a/CHandlingData.h +++ b/CHandlingData.hpp @@ -1,3 +1,5 @@ +#pragma once + class CHandlingData { public: diff --git a/CNetGamePlayer.h b/CNetGamePlayer.h deleted file mode 100644 index 9929764..0000000 --- a/CNetGamePlayer.h +++ /dev/null @@ -1,9 +0,0 @@ -#include "CPed.h" - -class CPedFactory -{ -public: - char pad_0000[8]; //0x0000 - class CPed *m_local_ped; //0x0008 -}; //Size: 0x0010 -static_assert(sizeof(CPedFactory) == 0x10); diff --git a/CNetGamePlayer.hpp b/CNetGamePlayer.hpp new file mode 100644 index 0000000..d34b705 --- /dev/null +++ b/CNetGamePlayer.hpp @@ -0,0 +1,18 @@ +#include "CPlayerInfo.hpp" + +class CNetGamePlayer +{ +public: + char pad_0000[24]; //0x0000 + uint32_t m_msg_id; //0x0018 + char pad_001C[4]; //0x001C + uint8_t m_active_id; //0x0020 + uint8_t m_player_id; //0x0021 + char pad_0022[110]; //0x0022 + uint8_t m_player_flag; //0x0090 + char pad_0091[15]; //0x0091 + class CPlayerInfo* m_player_info; //0x00A0 + char pad_00A8[40]; //0x00A8 + uint32_t m_bubble_id; //0x00D0 +}; //Size: 0x00D4 +static_assert(sizeof(CNetGamePlayer) == 0xD4); diff --git a/CPed.h b/CPed.hpp similarity index 70% rename from CPed.h rename to CPed.hpp index d0c3e41..5d8af0b 100644 --- a/CPed.h +++ b/CPed.hpp @@ -1,21 +1,24 @@ -#include "CAutomobile.h" -#include "CPedModelInfo.h" -#include "CPedWeaponManager.h" -#include "CPlayerInfo.h" -#include "pgBase.h" +#pragma once +#include "CAutomobile.hpp" +#include "CPedModelInfo.hpp" +#include "CPedWeaponManager.hpp" +#include "CPlayerInfo.hpp" +#include "pgBase.hpp" + +#pragma pack(push, 1) class CPed { public: char pad_0000[32]; //0x0000 - class CPedModelInfo *m_ped_model_info; //0x0020 + class CPedModelInfo* m_ped_model_info; //0x0020 uint8_t m_entity_type; //0x0028 char pad_0029[3]; //0x0029 uint8_t m_invisible; //0x002C char pad_002D[1]; //0x002D uint8_t m_freeze_momentum; //0x002E char pad_002F[1]; //0x002F - class pgBase *m_posbase; //0x0030 + class pgBase* m_posbase; //0x0030 char pad_0038[88]; //0x0038 rage::vector3 m_camera; //0x0090 char pad_009C[237]; //0x009C @@ -29,11 +32,11 @@ public: char pad_02A4[124]; //0x02A4 rage::vector3 m_velocity; //0x0320 char pad_032C[2564]; //0x032C - class CAutomobile *m_vehicle; //0x0D30 + class CAutomobile* m_vehicle; //0x0D30 char pad_0D38[912]; //0x0D38 - class CPlayerInfo *m_player_info; //0x10C8 + class CPlayerInfo* m_player_info; //0x10C8 char pad_10D0[8]; //0x10D0 - class CPedWeaponManager *m_weapon_manager; //0x10D8 + class CPedWeaponManager* m_weapon_manager; //0x10D8 char pad_10E0[812]; //0x10E0 uint8_t m_bike_seatbelt; //0x140C char pad_140D[11]; //0x140D @@ -44,3 +47,5 @@ public: float m_armor; //0x14E0 }; //Size: 0x14E4 static_assert(sizeof(CPed) == 0x14E4); + +#pragma pack(pop) diff --git a/CPedFactory.h b/CPedFactory.hpp similarity index 63% rename from CPedFactory.h rename to CPedFactory.hpp index 9929764..678bfeb 100644 --- a/CPedFactory.h +++ b/CPedFactory.hpp @@ -1,9 +1,10 @@ -#include "CPed.h" +#pragma once +#include "CPed.hpp" class CPedFactory { public: char pad_0000[8]; //0x0000 - class CPed *m_local_ped; //0x0008 + class CPed* m_local_ped; //0x0008 }; //Size: 0x0010 static_assert(sizeof(CPedFactory) == 0x10); diff --git a/CPedModelInfo.h b/CPedModelInfo.hpp similarity index 91% rename from CPedModelInfo.h rename to CPedModelInfo.hpp index b89f733..ecac9a4 100644 --- a/CPedModelInfo.h +++ b/CPedModelInfo.hpp @@ -1,3 +1,5 @@ +#pragma once + class CPedModelInfo { public: diff --git a/CPedWeaponManager.h b/CPedWeaponManager.hpp similarity index 58% rename from CPedWeaponManager.h rename to CPedWeaponManager.hpp index b37261a..d7cad5a 100644 --- a/CPedWeaponManager.h +++ b/CPedWeaponManager.hpp @@ -1,14 +1,15 @@ -#include "CWeaponInfo.h" +#pragma once +#include "CWeaponInfo.hpp" class CPedWeaponManager { public: char pad_0000[16]; //0x0000 - class CPed *m_owner; //0x0010 + class CPed* m_owner; //0x0010 uint32_t m_selected_weapon_hash; //0x0018 char pad_001C[4]; //0x001C - class CWeaponInfo *m_weapon_info; //0x0020 + class CWeaponInfo* m_weapon_info; //0x0020 char pad_0028[72]; //0x0028 - class CWeaponInfo *m_vehicle_weapon_info; //0x0070 + class CWeaponInfo* m_vehicle_weapon_info; //0x0070 }; //Size: 0x0078 static_assert(sizeof(CPedWeaponManager) == 0x78); diff --git a/CPlayerInfo.h b/CPlayerInfo.hpp similarity index 75% rename from CPlayerInfo.h rename to CPlayerInfo.hpp index 2583b0a..4756f3c 100644 --- a/CPlayerInfo.h +++ b/CPlayerInfo.hpp @@ -1,16 +1,34 @@ +#pragma once + +#pragma warning(push) +#pragma warning(disable : 4201) // nonstandard extension used: nameless struct/union +union netAddress +{ + std::uint32_t m_raw; + struct + { + std::uint8_t m_field4; + std::uint8_t m_field3; + std::uint8_t m_field2; + std::uint8_t m_field1; + }; +}; +#pragma warning(pop) + +#pragma pack(push, 1) class CPlayerInfo { public: char pad_0000[40]; //0x0000 uint64_t m_rockstar_id; //0x0028 char pad_0030[52]; //0x0030 - uint32_t m_relay_ip; //0x0064 + netAddress m_relay_ip; //0x0064 uint16_t m_relay_port; //0x0068 char pad_006A[2]; //0x006A - uint32_t m_external_ip; //0x006C + netAddress m_external_ip; //0x006C uint16_t m_external_port; //0x0070 char pad_0072[2]; //0x0072 - uint32_t m_internal_ip; //0x0074 + netAddress m_internal_ip; //0x0074 uint16_t m_internal_port; //0x0078 char pad_007A[22]; //0x007A uint64_t m_rockstar_id2; //0x0090 @@ -21,7 +39,7 @@ public: char pad_0174[20]; //0x0174 uint32_t m_water_proof; //0x0188 char pad_018C[92]; //0x018C - class CPed *m_ped; //0x01E8 + class CPed* m_ped; //0x01E8 char pad_01F0[40]; //0x01F0 uint32_t m_frame_flags; //0x0218 char pad_021C[52]; //0x021C @@ -50,3 +68,5 @@ public: float m_melee_weapon_defence_mult; //0x0D2C }; //Size: 0x0D30 static_assert(sizeof(CPlayerInfo) == 0xD30); + +#pragma pack(pop) diff --git a/CVehicleDrawHandler.h b/CVehicleDrawHandler.hpp similarity index 99% rename from CVehicleDrawHandler.h rename to CVehicleDrawHandler.hpp index 013e222..b52de46 100644 --- a/CVehicleDrawHandler.h +++ b/CVehicleDrawHandler.hpp @@ -1,3 +1,5 @@ +#pragma once + class CVehicleDrawHandler { public: diff --git a/CVehicleModelInfo.h b/CVehicleModelInfo.hpp similarity index 92% rename from CVehicleModelInfo.h rename to CVehicleModelInfo.hpp index 21ea383..24514cb 100644 --- a/CVehicleModelInfo.h +++ b/CVehicleModelInfo.hpp @@ -1,3 +1,5 @@ +#pragma once + class CVehicleModelInfo { public: diff --git a/CWeaponInfo.h b/CWeaponInfo.hpp similarity index 92% rename from CWeaponInfo.h rename to CWeaponInfo.hpp index 4e5649e..2f51b7a 100644 --- a/CWeaponInfo.h +++ b/CWeaponInfo.hpp @@ -1,4 +1,5 @@ -#include "CAmmoInfo.h" +#pragma once +#include "CAmmoInfo.hpp" class CWeaponInfo { @@ -9,7 +10,7 @@ public: char pad_0018[12]; //0x0018 uint32_t m_impact_explosion; //0x0024 char pad_0028[56]; //0x0028 - class CAmmoInfo *m_ammo_info; //0x0060 + class CAmmoInfo* m_ammo_info; //0x0060 char pad_0068[20]; //0x0068 float m_spread; //0x007C char pad_0080[60]; //0x0080 diff --git a/gtav.rcnet b/gtav.rcnet index ab5b57739402fc5b19ba57155e4b01f09471a50c..7df5b6dfde21c0d1c1581be6eec62d239acb4dea 100644 GIT binary patch delta 28 kcmaDJ{5+T^z?+#xgn@y9gF$n~MxNQ4Oqw$$uhg^y0CUX;=Kufz delta 28 jcmaDJ{5+T^z?+#xgn@y9gCVqkBhPG2rqKS$D>dx^c6bOa diff --git a/pgBase.h b/pgBase.hpp similarity index 90% rename from pgBase.h rename to pgBase.hpp index a57c8da..858c118 100644 --- a/pgBase.h +++ b/pgBase.hpp @@ -1,3 +1,5 @@ +#pragma once + class pgBase { public: