From b74e688860b0df47d7ec87c1eb6227ee853fc90a Mon Sep 17 00:00:00 2001 From: Mr-X-GTA <110748953+Mr-X-GTA@users.noreply.github.com> Date: Sat, 13 Dec 2025 17:49:21 +0100 Subject: [PATCH] Update for b3717 (#9) --- .../nodes/train/CTrainGameStateDataNode.hpp | 50 ++++++++++--------- script/globals/GPBD_FM.hpp | 9 ++-- script/globals/GPBD_FM_3.hpp | 10 ++-- script/globals/GSBD.hpp | 4 +- script/globals/GSBD_FM.hpp | 11 ++-- script/globals/GlobalPlayerBD.hpp | 5 +- script/globals/g_AMC_playerBD.hpp | 4 +- script/types.hpp | 2 +- 8 files changed, 52 insertions(+), 43 deletions(-) diff --git a/netsync/nodes/train/CTrainGameStateDataNode.hpp b/netsync/nodes/train/CTrainGameStateDataNode.hpp index 6d1fba2..5f868fa 100644 --- a/netsync/nodes/train/CTrainGameStateDataNode.hpp +++ b/netsync/nodes/train/CTrainGameStateDataNode.hpp @@ -1,31 +1,33 @@ #pragma once -#include #include "netsync/CProjectBaseSyncDataNode.hpp" -#pragma pack(push,4) +#include + +#pragma pack(push, 8) class CTrainGameStateDataNode : CSyncDataNodeInfrequent { public: - bool m_is_engine; //0x00C0 - bool m_is_caboose; //0x00C1 - bool m_is_mission_train; //0x00C2 - bool m_direction; //0x00C3 - bool m_has_passenger_carriages; //0x00C4 - bool m_render_derailed; //0x00C5 - bool unk_00C6; //0x00C6 - bool unk_00C7; //0x00C7 - uint16_t m_engine_id; //0x00C8 - int8_t m_train_config_index; //0x00CA - int8_t m_carriage_config_index; //0x00CB - int8_t m_track_id; //0x00CC - char pad_00CD[3]; //0x00CD - float m_distance_from_engine; //0x00D0 - float m_cruise_speed; //0x00D4 - uint16_t m_linked_to_backward_id; //0x00D8 - uint16_t m_linked_to_forward_id; //0x00DA - uint32_t m_train_state; //0x0DC - bool unk_00E0; //0x00E0 - bool m_force_doors_open; //0x0E1 -}; //Size: 0x00E4 -static_assert(sizeof(CTrainGameStateDataNode) == 0xE4); + bool m_is_engine; //0x00C0 + bool unk_00C1; //0x00C1 + bool m_is_caboose; //0x00C2 + bool m_is_mission_train; //0x00C3 + bool m_direction; //0x00C4 + bool m_has_passenger_carriages; //0x00C5 + bool m_render_derailed; //0x00C6 + bool unk_00C7; //0x00C7 + bool new_00C8; //0x00C8 added b3717 + uint16_t m_engine_id; //0x00CA + int8_t m_train_config_index; //0x00CC + int8_t m_carriage_config_index; //0x00CD + int8_t m_track_id; //0x00CE + float m_distance_from_engine; //0x00D0 + float new_00D4; //0x00D4 added b3717 + float m_cruise_speed; //0x00D8 + uint16_t m_linked_to_backward_id; //0x00DC + uint16_t m_linked_to_forward_id; //0x00DE + uint32_t m_train_state; //0x00E0 + bool m_force_doors_open; //0x00E4 + bool unk_00E0; //0x00E5 +}; //Size: 0x00E8 +static_assert(sizeof(CTrainGameStateDataNode) == 0xE8); #pragma pack(pop) \ No newline at end of file diff --git a/script/globals/GPBD_FM.hpp b/script/globals/GPBD_FM.hpp index 5b9ea81..3031acb 100644 --- a/script/globals/GPBD_FM.hpp +++ b/script/globals/GPBD_FM.hpp @@ -478,9 +478,10 @@ struct FIELD_HANGAR_DATA }; static_assert(sizeof(FIELD_HANGAR_DATA) == 2 * 8); -#define NUM_PROPERTY_INTERIORS 33 // (30 -> 31) b3095 +#define NUM_PROPERTY_INTERIORS 36 // (30 -> 31) b3095 // (31 -> 32) b3258 // (32 -> 33) b3407 + // (33 -> 36) b3717 struct PROPERTY_DATA { @@ -569,7 +570,7 @@ struct PROPERTY_DATA HACKER_DEN_DATA HackerDenData; FIELD_HANGAR_DATA FieldHangarData; }; -static_assert(sizeof(PROPERTY_DATA) == 542 * 8); +static_assert(sizeof(PROPERTY_DATA) == 548 * 8); struct BIKER_CONTRACTS { @@ -676,10 +677,10 @@ struct GPBD_FM_Entry ARENA_WAR_DATA ArenaWarData; // @858 as of 1.67 SCR_INT ApartmentEnterFlags; }; -static_assert(sizeof(GPBD_FM_Entry) == 874 * 8); +static_assert(sizeof(GPBD_FM_Entry) == 880 * 8); struct GPBD_FM { SCR_ARRAY Entries; }; -static_assert(sizeof(GPBD_FM) == 27969 * 8); \ No newline at end of file +static_assert(sizeof(GPBD_FM) == 28161 * 8); \ No newline at end of file diff --git a/script/globals/GPBD_FM_3.hpp b/script/globals/GPBD_FM_3.hpp index 4bff163..0811a68 100644 --- a/script/globals/GPBD_FM_3.hpp +++ b/script/globals/GPBD_FM_3.hpp @@ -158,6 +158,7 @@ struct BOSS_GOON SCR_BITSET Flags; SCR_INT Flags2; // TODO SCR_INT Flags3; // TODO + SCR_INT Flags4; // added b3717 SCR_INT TotalBossGoonTime; SCR_ARRAY BossGoonUUID; SCR_ARRAY Goons; @@ -222,6 +223,7 @@ struct BOSS_GOON SCR_BOOL CasinoLimoActive; SCR_BOOL CasinoLuxuryCarActive; SCR_HASH CasinoLuxuryCarModel; + SCR_INT PAD_0309; // added b3717 CASINO_HEIST_PREP CasinoHeistPrep; SCR_INT CayoPrepIndex; SCR_INT CompanySUVDestination; @@ -279,9 +281,11 @@ struct BOSS_GOON SCR_INT NightclubMissionIndex; SCR_INT NightclubDefendMissionIndex; uint64_t PAD_0478[18]; // TODO + SCR_HASH PAD_0501; // added b3717 + SCR_INT PAD_0502; // added b3717 SCR_BOOL DoubleActionCacheLocationRevealed; }; -static_assert(sizeof(BOSS_GOON) == 500 * 8); +static_assert(sizeof(BOSS_GOON) == 504 * 8); struct MC_STATS { @@ -349,10 +353,10 @@ struct GBPD_FM_3_Entry SCR_INT CasinoFlowProgress; SCR_ARRAY DailyObjectiveFlags; // @607 as of 1.67 }; -static_assert(sizeof(GBPD_FM_3_Entry) == 611 * 8); +static_assert(sizeof(GBPD_FM_3_Entry) == 615 * 8); struct GPBD_FM_3 { SCR_ARRAY Entries; }; -static_assert(sizeof(GPBD_FM_3) == 19553 * 8); +static_assert(sizeof(GPBD_FM_3) == 19681 * 8); diff --git a/script/globals/GSBD.hpp b/script/globals/GSBD.hpp index c52eb4b..696319c 100644 --- a/script/globals/GSBD.hpp +++ b/script/globals/GSBD.hpp @@ -84,7 +84,7 @@ struct GSBD SCR_BOOL PAD_0816; // always set to FALSE SCR_INT PAD_0817; // unused CEO_COLORS CeoColors; - SMPL_INTERIOR_DATA_SERVER SimpleInteriorData; + //SMPL_INTERIOR_DATA_SERVER SimpleInteriorData; b3717 -> Global_2658056 LEAVE_CLUBHOUSE_SERVER LeaveClubhouse; SCR_ARRAY IEDeliveryInfos; SCR_INT PAD_1397; @@ -92,4 +92,4 @@ struct GSBD uint64_t PAD_1399[97]; SCR_INT CayoPericoStrandedAnimalChoice; }; -static_assert(sizeof(GSBD) == 1499 * 8); \ No newline at end of file +static_assert(sizeof(GSBD) == 1264 * 8); \ No newline at end of file diff --git a/script/globals/GSBD_FM.hpp b/script/globals/GSBD_FM.hpp index 3d60f10..3c00ed9 100644 --- a/script/globals/GSBD_FM.hpp +++ b/script/globals/GSBD_FM.hpp @@ -24,13 +24,14 @@ struct WEAPON_PICKUPS SCR_INT LastMeleeWeaponPickupTime; SCR_INT LastProjectilePickupTime; SCR_INT LastGunPickupTime; - SCR_ARRAY Indices; // size increased in b3095 (62 -> 95) + SCR_ARRAY Indices; // size increased in b3095 (62 -> 95) // and in b3407 (95 -> 96) - SCR_ARRAY Owners; + // b3717 (96 -> 95) + SCR_ARRAY Owners; SCR_INT SpawnCounter; SCR_INT AmmoCount; }; -static_assert(sizeof(WEAPON_PICKUPS) == 200 * 8); +static_assert(sizeof(WEAPON_PICKUPS) == 198 * 8); struct BIKER_CONTRACTS_SERVER { @@ -50,7 +51,7 @@ struct GSBD_FM SCR_ARRAY MuggingPlayers; // 0 = mugger, 1 = merryweather mercs SCR_ARRAY MuggedPlayers; uint64_t PAD_0112[4]; // unused - SCR_ARRAY PAD_0116; // TODO b3407 (61 -> 62) + SCR_ARRAY PAD_0116; // TODO b3407 (61 -> 62), b3717 (62 -> 65) SCR_INT ShopProcessingBitset; SCR_ARRAY ActiveContactServiceBitsets; SCR_ARRAY ActiveContactServices; @@ -65,4 +66,4 @@ struct GSBD_FM SCR_ARRAY DoubleActionCacheLocationRevealed; SCR_INT TimeUpdated; }; -static_assert(sizeof(GSBD_FM) == 649 * 8); +static_assert(sizeof(GSBD_FM) == 652 * 8); diff --git a/script/globals/GlobalPlayerBD.hpp b/script/globals/GlobalPlayerBD.hpp index 010a603..626e611 100644 --- a/script/globals/GlobalPlayerBD.hpp +++ b/script/globals/GlobalPlayerBD.hpp @@ -561,6 +561,7 @@ struct GlobalPlayerBDEntry NETWORK_INDEX DeliveryBikeNetId; NETWORK_INDEX BountyTransporterNetId; // added b3258 NETWORK_INDEX FieldDusterNetId; // added b3407 + NETWORK_INDEX MansionHeliNetId; // added b3717 SCR_BOOL PAD_0057; // (@59 as of b3407) uint64_t PAD_0058[15]; // confirmed these are not used by PC scripts PLAYER_BLIP PlayerBlip; @@ -676,10 +677,10 @@ struct GlobalPlayerBDEntry SCR_BOOL CanSpawnGunVan; }; -static_assert(sizeof(GlobalPlayerBDEntry) == 467 * 8); +static_assert(sizeof(GlobalPlayerBDEntry) == 468 * 8); struct GlobalPlayerBD { SCR_ARRAY Entries; }; -static_assert(sizeof(GlobalPlayerBD) == 14945 * 8); \ No newline at end of file +static_assert(sizeof(GlobalPlayerBD) == 14977 * 8); \ No newline at end of file diff --git a/script/globals/g_AMC_playerBD.hpp b/script/globals/g_AMC_playerBD.hpp index ccd21e5..2c845f4 100644 --- a/script/globals/g_AMC_playerBD.hpp +++ b/script/globals/g_AMC_playerBD.hpp @@ -7,10 +7,10 @@ struct g_AMC_playerBD_Entry SCR_ARRAY UsedContactServicesTimer; // only index 2 (mugger) is actually used by the scripts. the rest is just a waste of bandwidth SCR_ARRAY ContactServiceCooldowns; // same as above }; -static_assert(sizeof(g_AMC_playerBD_Entry) == 251 * 8); +static_assert(sizeof(g_AMC_playerBD_Entry) == 257 * 8); struct g_AMC_playerBD { SCR_ARRAY Entries; }; -static_assert(sizeof(g_AMC_playerBD) == 8033 * 8); \ No newline at end of file +static_assert(sizeof(g_AMC_playerBD) == 8225 * 8); \ No newline at end of file diff --git a/script/types.hpp b/script/types.hpp index 667279f..df540cb 100644 --- a/script/types.hpp +++ b/script/types.hpp @@ -100,4 +100,4 @@ private: }; static_assert(sizeof(GAMER_HANDLE) == 13 * 8); -#define NUM_CONTACTS 83 \ No newline at end of file +#define NUM_CONTACTS 85 \ No newline at end of file