From b874a00c18dac7d257c089840be52f78c96265e3 Mon Sep 17 00:00:00 2001 From: maybegreat48 <96936658+maybegreat48@users.noreply.github.com> Date: Wed, 13 Dec 2023 22:28:38 +0000 Subject: [PATCH] Some more class fixes (#150) For GTA V 1.68 b3095 --- network/Network.hpp | 4 ++-- script/globals/GPBD_FM.hpp | 29 +++++++++++++++++++++-------- script/globals/GPBD_FM_3.hpp | 2 +- script/globals/GSBD.hpp | 5 +++-- script/globals/GSBD_FM.hpp | 8 ++++---- script/globals/GlobalPlayerBD.hpp | 7 ++++++- 6 files changed, 37 insertions(+), 18 deletions(-) diff --git a/network/Network.hpp b/network/Network.hpp index b695b91..46c77aa 100644 --- a/network/Network.hpp +++ b/network/Network.hpp @@ -208,7 +208,7 @@ public: class NetworkGameFilter m_network_game_filter; //0xB098 char pad_B3DC[33]; //0xB3DC bool m_was_invited; //0xB3FD - char pad_B3FE[10]; //0xB3FE + char pad_B3FE[26]; //0xB3FE TODO: the reclass file is broken class rage::rlSessionInfo m_unk_session_info; //0xB408 char pad_B4D8[635]; //0xB4D8 bool m_need_host_change; //0xB753 @@ -284,5 +284,5 @@ public: uint32_t m_follower_count; //0x49EE0 char pad_49EE4[628]; //0x49EE4 }; //Size: 0x38650 -static_assert(sizeof(Network) == 0x4A158); +static_assert(sizeof(Network) == 0x4A168); #pragma pack(pop) \ No newline at end of file diff --git a/script/globals/GPBD_FM.hpp b/script/globals/GPBD_FM.hpp index 41279d5..2f06877 100644 --- a/script/globals/GPBD_FM.hpp +++ b/script/globals/GPBD_FM.hpp @@ -434,7 +434,7 @@ struct FIXER_HQ_DATA }; static_assert(sizeof(FIXER_HQ_DATA) == 3 * 8); -// eclipse blvd garage (currently unreleased) +// eclipse blvd garage struct MULTI_STOREY_GARAGE_DATA { SCR_INT Index; // always one for obvious reasons @@ -444,9 +444,21 @@ struct MULTI_STOREY_GARAGE_DATA }; static_assert(sizeof(MULTI_STOREY_GARAGE_DATA) == 6 * 8); +struct SALVAGE_YARD_DATA +{ + SCR_INT Index; + SCR_INT PAD_0001; + SCR_INT AppearanceBitset; + SCR_INT TowTruckColor; + SCR_INT TowTruckType; // TODO + SCR_INT VehicleRobVehicleIndex; + SCR_INT TotalEarnings; +}; +static_assert(sizeof(SALVAGE_YARD_DATA) == 7 * 8); + struct PROPERTY_DATA { - SCR_ARRAY PropertyIds; + SCR_ARRAY PropertyIds; // size 30 -> 31 b3095 SCR_BITSETFlags; // I really don't want to indent everything again SCR_INT RingingPlayers; // bitset of players requesting entry into property SCR_INT Index; // the value you pass to the send to apartment TSE @@ -455,7 +467,7 @@ struct PROPERTY_DATA PLAYER_INDEX ExteriorOwner; SCR_ARRAY RingingPlayersState; // 0 = ringing, 1 = accepted, 2 = denied GAMER_HANDLE OwnerHandle; // can be used to bypass RID spoofing when player is inside interior - SCR_ARRAY EclipseTheme; // not sure why this is an array of 30 yet + SCR_ARRAY EclipseTheme; // size 30 -> 31 b3095 SCR_INT ApartmentType; // normal vs stilt vs eclipse SCR_INT OwnerInstance; // same as Instance in most cases SCR_ARRAY ExecutiveWarehouseInfos; @@ -519,6 +531,7 @@ struct PROPERTY_DATA SCR_INT PAD_0478; // TODO SUBMARINE_DATA SubmarineData; AUTOSHOP_DATA AutoShopData; + SALVAGE_YARD_DATA SalvageYardData; SCR_ARRAY AutoShopArcadeMachineSlots; CAR_CLUB_DATA CarClubData; FIXER_HQ_DATA FixerHQData; @@ -528,7 +541,7 @@ struct PROPERTY_DATA MULTI_STOREY_GARAGE_DATA MultiStoreyGarageData; // @507 as of 1.67 SCR_INT FreakshopBits; // 0: has weapon workshop, 1: radio enabled }; -static_assert(sizeof(PROPERTY_DATA) == 514 * 8); +static_assert(sizeof(PROPERTY_DATA) == 523 * 8); struct BIKER_CONTRACTS { @@ -603,7 +616,7 @@ struct GPBD_FM_Entry PLAYER_STATS PlayerStats; SCR_INT PAD_265; SCR_INT Mood; - PROPERTY_DATA PropertyData; + PROPERTY_DATA PropertyData; // @267 as of b3095 uint64_t PAD_0779[4]; // TODO uint64_t PAD_0783[12]; // no clue what it does but it looks rather interesting SCR_INT AssistedKillFlags; @@ -615,7 +628,7 @@ struct GPBD_FM_Entry SCR_INT ActivePVSlot; PLAYER_INDEX SpectatingPlayer; SCR_INT PAD_0803; - SCR_ARRAY ActiveAmbientWeaponPickups; + SCR_ARRAY ActiveAmbientWeaponPickups; // size 2 -> 3 b3095 SCR_ARRAY OfficeMapMarkers; SCR_INT OfficeLargestMoneyThresholdIndex; SCR_ARRAY EnabledOfficeCashPiles; @@ -637,10 +650,10 @@ struct GPBD_FM_Entry SCR_INT ApartmentEnterFlags; SCR_VEC3 AvengerMissionStartPosition; }; -static_assert(sizeof(GPBD_FM_Entry) == 867 * 8); +static_assert(sizeof(GPBD_FM_Entry) == 877 * 8); struct GPBD_FM { SCR_ARRAY Entries; }; -static_assert(sizeof(GPBD_FM) == 27745 * 8); +static_assert(sizeof(GPBD_FM) == 28065 * 8); diff --git a/script/globals/GPBD_FM_3.hpp b/script/globals/GPBD_FM_3.hpp index b9b9311..ad05095 100644 --- a/script/globals/GPBD_FM_3.hpp +++ b/script/globals/GPBD_FM_3.hpp @@ -110,7 +110,7 @@ struct MC_STYLE SCR_BOOL Enabled; SCR_INT BossOutfitType; SCR_INT GoonOutfitType; - SCR_ARRAY GoonOutfitIndices; // one outfit for each goon, size is 7 instead of 8 for some reason + SCR_ARRAY GoonOutfitIndices; // one outfit for each goon SCR_ARRAY GoonOutfitIndicesOverride; SCR_INT PAD_0019; SCR_BOOL HeadgearEnabled; diff --git a/script/globals/GSBD.hpp b/script/globals/GSBD.hpp index 01e8e7d..f1ea0ba 100644 --- a/script/globals/GSBD.hpp +++ b/script/globals/GSBD.hpp @@ -25,8 +25,9 @@ struct CEO_COLORS SCR_ARRAY CeoColors; SCR_INT PAD_0065; uint64_t PAD_0066[19]; + SCR_INT PAD_0085; // added b3095 ("Press ~INPUT_CONTEXT~ to contact Jamal and begin stealing bolt cutters for The Cargo Ship Robbery" mission variation) }; -static_assert(sizeof(CEO_COLORS) == 85 * 8); +static_assert(sizeof(CEO_COLORS) == 86 * 8); struct SMPL_INTERIOR_DATA_SERVER { @@ -90,4 +91,4 @@ struct GSBD uint64_t PAD_1399[97]; SCR_INT CayoPericoStrandedAnimalChoice; }; -static_assert(sizeof(GSBD) == 1497 * 8); \ No newline at end of file +static_assert(sizeof(GSBD) == 1498 * 8); \ No newline at end of file diff --git a/script/globals/GSBD_FM.hpp b/script/globals/GSBD_FM.hpp index dc67447..a0449ab 100644 --- a/script/globals/GSBD_FM.hpp +++ b/script/globals/GSBD_FM.hpp @@ -24,12 +24,12 @@ struct WEAPON_PICKUPS SCR_INT LastMeleeWeaponPickupTime; SCR_INT LastProjectilePickupTime; SCR_INT LastGunPickupTime; - SCR_ARRAY Indices; - SCR_ARRAY Owners; + SCR_ARRAY Indices; // size increased in b3095 (62 -> 95) + SCR_ARRAY Owners; SCR_INT SpawnCounter; SCR_INT AmmoCount; }; -static_assert(sizeof(WEAPON_PICKUPS) == 132 * 8); +static_assert(sizeof(WEAPON_PICKUPS) == 198 * 8); struct BIKER_CONTRACTS_SERVER { @@ -63,4 +63,4 @@ struct GSBD_FM BIKER_CONTRACTS_SERVER BikerContracts; SCR_ARRAY DoubleActionCacheLocationRevealed; }; -static_assert(sizeof(GSBD_FM) == 576 * 8); \ No newline at end of file +static_assert(sizeof(GSBD_FM) == 642 * 8); \ No newline at end of file diff --git a/script/globals/GlobalPlayerBD.hpp b/script/globals/GlobalPlayerBD.hpp index cc45cd2..706b326 100644 --- a/script/globals/GlobalPlayerBD.hpp +++ b/script/globals/GlobalPlayerBD.hpp @@ -388,7 +388,12 @@ enum class eSimpleInteriorIndex SIMPLE_INTERIOR_FIXER_HQ_VESPUCCI, SIMPLE_INTERIOR_ACID_LAB, SIMPLE_INTERIOR_JUGGALO_HIDEOUT, - SIMPLE_INTERIOR_MULTISTOREY_GARAGE + SIMPLE_INTERIOR_MULTISTOREY_GARAGE, + SIMPLE_INTERIOR_SALVAGE_YARD_LA_PUERTA, + SIMPLE_INTERIOR_SALVAGE_YARD_MURIETTA_HEIGHTS, + SIMPLE_INTERIOR_SALVAGE_YARD_PALETO_BAY, + SIMPLE_INTERIOR_SALVAGE_YARD_SANDY_SHORES, + SIMPLE_INTERIOR_SALVAGE_YARD_STRAWBERRY, }; struct JOB_STATS