Skip to content

Commit

Permalink
Some more class fixes (#150)
Browse files Browse the repository at this point in the history
For GTA V 1.68 b3095
  • Loading branch information
maybegreat48 authored Dec 13, 2023
1 parent 08cc88c commit 760585b
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 18 deletions.
4 changes: 2 additions & 2 deletions network/Network.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class Network
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
Expand Down Expand Up @@ -284,5 +284,5 @@ class Network
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)
29 changes: 21 additions & 8 deletions script/globals/GPBD_FM.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<uint64_t, 30> PropertyIds;
SCR_ARRAY<uint64_t, 31> PropertyIds; // size 30 -> 31 b3095
SCR_BITSET<ePropertyInteriorFlags>Flags; // 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
Expand All @@ -455,7 +467,7 @@ struct PROPERTY_DATA
PLAYER_INDEX ExteriorOwner;
SCR_ARRAY<uint64_t, 32> RingingPlayersState; // 0 = ringing, 1 = accepted, 2 = denied
GAMER_HANDLE OwnerHandle; // can be used to bypass RID spoofing when player is inside interior
SCR_ARRAY<uint64_t, 30> EclipseTheme; // not sure why this is an array of 30 yet
SCR_ARRAY<uint64_t, 31> EclipseTheme; // size 30 -> 31 b3095
SCR_INT ApartmentType; // normal vs stilt vs eclipse
SCR_INT OwnerInstance; // same as Instance in most cases
SCR_ARRAY<EXEC_WAREHOUSE_INFO, 5> ExecutiveWarehouseInfos;
Expand Down Expand Up @@ -519,6 +531,7 @@ struct PROPERTY_DATA
SCR_INT PAD_0478; // TODO
SUBMARINE_DATA SubmarineData;
AUTOSHOP_DATA AutoShopData;
SALVAGE_YARD_DATA SalvageYardData;
SCR_ARRAY<uint64_t, 2> AutoShopArcadeMachineSlots;
CAR_CLUB_DATA CarClubData;
FIXER_HQ_DATA FixerHQData;
Expand All @@ -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
{
Expand Down Expand Up @@ -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;
Expand All @@ -615,7 +628,7 @@ struct GPBD_FM_Entry
SCR_INT ActivePVSlot;
PLAYER_INDEX SpectatingPlayer;
SCR_INT PAD_0803;
SCR_ARRAY<uint64_t, 2> ActiveAmbientWeaponPickups;
SCR_ARRAY<uint64_t, 3> ActiveAmbientWeaponPickups; // size 2 -> 3 b3095
SCR_ARRAY<uint64_t, 6> OfficeMapMarkers;
SCR_INT OfficeLargestMoneyThresholdIndex;
SCR_ARRAY<uint64_t, 2> EnabledOfficeCashPiles;
Expand All @@ -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<GPBD_FM_Entry, 32> Entries;
};
static_assert(sizeof(GPBD_FM) == 27745 * 8);
static_assert(sizeof(GPBD_FM) == 28065 * 8);
2 changes: 1 addition & 1 deletion script/globals/GPBD_FM_3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ struct MC_STYLE
SCR_BOOL Enabled;
SCR_INT BossOutfitType;
SCR_INT GoonOutfitType;
SCR_ARRAY<uint64_t, 7> GoonOutfitIndices; // one outfit for each goon, size is 7 instead of 8 for some reason
SCR_ARRAY<uint64_t, 7> GoonOutfitIndices; // one outfit for each goon
SCR_ARRAY<uint64_t, 7> GoonOutfitIndicesOverride;
SCR_INT PAD_0019;
SCR_BOOL HeadgearEnabled;
Expand Down
5 changes: 3 additions & 2 deletions script/globals/GSBD.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ struct CEO_COLORS
SCR_ARRAY<CEO_COLOR, 10> 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
{
Expand Down Expand Up @@ -90,4 +91,4 @@ struct GSBD
uint64_t PAD_1399[97];
SCR_INT CayoPericoStrandedAnimalChoice;
};
static_assert(sizeof(GSBD) == 1497 * 8);
static_assert(sizeof(GSBD) == 1498 * 8);
8 changes: 4 additions & 4 deletions script/globals/GSBD_FM.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ struct WEAPON_PICKUPS
SCR_INT LastMeleeWeaponPickupTime;
SCR_INT LastProjectilePickupTime;
SCR_INT LastGunPickupTime;
SCR_ARRAY<uint64_t, 62> Indices;
SCR_ARRAY<uint64_t, 62> Owners;
SCR_ARRAY<uint64_t, 95> Indices; // size increased in b3095 (62 -> 95)
SCR_ARRAY<uint64_t, 95> 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
{
Expand Down Expand Up @@ -63,4 +63,4 @@ struct GSBD_FM
BIKER_CONTRACTS_SERVER BikerContracts;
SCR_ARRAY<uint64_t, 32> DoubleActionCacheLocationRevealed;
};
static_assert(sizeof(GSBD_FM) == 576 * 8);
static_assert(sizeof(GSBD_FM) == 642 * 8);
7 changes: 6 additions & 1 deletion script/globals/GlobalPlayerBD.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 760585b

Please sign in to comment.