Skip to content

Commit

Permalink
Update for b3258 (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
maybegreat48 authored Jul 3, 2024
1 parent 68551ec commit 3d41688
Show file tree
Hide file tree
Showing 9 changed files with 157 additions and 139 deletions.
1 change: 1 addition & 0 deletions netsync/nodes/ped/CPedGameStateDataNode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class CPedGameStateDataNode : CSyncDataNodeInfrequent
uint16_t m_mount_id; //0x0142
uint16_t m_custodian_id; //0x0144
uint16_t unk_0146; // 0x0146
uint8_t new_014C;
bool m_tint_index; //0x0148
char pad_0149; //0x0149
uint8_t unk_014A; // 0x014A
Expand Down
13 changes: 9 additions & 4 deletions network/Network.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ class MatchmakingSessionResult
{
public:
class rage::rlSessionDetail m_detail;
char pad_03B8[24]; //0x03B8
char pad_03B8[88]; //0x03B8
}; //Size: 0x03D0
static_assert(sizeof(MatchmakingSessionResult) == 0x490);
static_assert(sizeof(MatchmakingSessionResult) == 0x4D0);

class PlayerNameMapNode
{
Expand Down Expand Up @@ -178,6 +178,8 @@ static_assert(sizeof(InvitedGamers) == 0xC88);
class Network
{
public:
bool m_unk;
char pad_0001[0x7];
rage::rlSessionInfo m_steam_unk_session; //0x0000
rage::Obf32 m_num_dinput8_instances; //0x0070
rage::Obf32 m_last_time_dinput8_checked; //0x0080
Expand Down Expand Up @@ -206,7 +208,7 @@ class Network
bool m_was_invited; //0xB3FD
char pad_B3FE[26]; //0xB3FE TODO: the reclass file is broken
class rage::rlSessionInfo m_unk_session_info; //0xB408
char pad_B4D8[635]; //0xB4D8
char pad_B4D8[643]; //0xB4D8
bool m_need_host_change; //0xB753
char pad_B754[74316]; //0xB754
class rage::rlSessionDetail m_joining_session_detail; //0x1D9A0
Expand Down Expand Up @@ -238,6 +240,9 @@ class Network
class rage::rlGamerHandle m_inviter_handle; //0x2DCE0
class CNetComplaintMgr m_game_complaint_mgr; //0x2DCF0
class CNetComplaintMgr m_transition_complaint_mgr; //0x2EB88

// fields beyond this point are likely outdated!

char pad_2FA20[32]; //0x2FA20
class JoiningPlayerNameMap m_unused_joining_player_name_map; //0x2FA40
char pad_31048[8]; //0x31048
Expand Down Expand Up @@ -280,5 +285,5 @@ class Network
uint32_t m_follower_count; //0x49EE0
char pad_49EE4[628]; //0x49EE4
}; //Size: 0x38650
static_assert(sizeof(Network) == 0x4A168);
static_assert(sizeof(Network) == 0x4A678);
#pragma pack(pop)
5 changes: 3 additions & 2 deletions network/netPlayer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ namespace rage
virtual void reset();
virtual bool is_valid();
virtual const char* get_name();
virtual void _0x50();
virtual std::uint64_t get_host_token();
virtual void _0x58();
virtual bool is_host();
virtual rage::rlGamerInfo* get_net_data();
virtual void _0x68();
virtual void _0x70();

char pad_0008[8]; //0x0008
CNonPhysicalPlayerData* m_non_physical_player; //0x0010
Expand Down
21 changes: 15 additions & 6 deletions script/globals/GPBD_FM.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,16 @@ struct SALVAGE_YARD_DATA
};
static_assert(sizeof(SALVAGE_YARD_DATA) == 7 * 8);

struct BAIL_SHOP_DATA
{
SCR_INT Index;
uint64_t PAD_0001[12];
};
static_assert(sizeof(BAIL_SHOP_DATA) == 13 * 8);

struct PROPERTY_DATA
{
SCR_ARRAY<uint64_t, 31> PropertyIds; // size 30 -> 31 b3095
SCR_ARRAY<uint64_t, 32> PropertyIds; // size 30 -> 31 b3095, size 31 -> 32 b3258
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 @@ -467,7 +474,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, 31> EclipseTheme; // size 30 -> 31 b3095
SCR_ARRAY<uint64_t, 32> EclipseTheme; // size 30 -> 31 b3095, size 31 -> 32 b3258
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 @@ -540,8 +547,9 @@ struct PROPERTY_DATA
VEHICLE_INDEX CurrentlyModdingVehicleFixerHQ;
MULTI_STOREY_GARAGE_DATA MultiStoreyGarageData; // @507 as of 1.67
SCR_INT FreakshopBits; // 0: has weapon workshop, 1: radio enabled
BAIL_SHOP_DATA BailShopData;
};
static_assert(sizeof(PROPERTY_DATA) == 523 * 8);
static_assert(sizeof(PROPERTY_DATA) == 538 * 8);

struct BIKER_CONTRACTS
{
Expand Down Expand Up @@ -585,6 +593,7 @@ struct GPBD_FM_Entry
TEXT_LABEL_63 JobName;
SCR_ARRAY<uint64_t, 2> ActiveGunRange; // this should have really been an enum lol
MP_SCRIPT_DATA MissionScriptData;
SCR_BOOL PAD_0057; // added b3258, some mission thing
JOB_SETTINGS JobSettings;
SCR_INT FMMCLauncherState;
VEHICLE_SELECTION VehicleSelection;
Expand Down Expand Up @@ -643,17 +652,17 @@ struct GPBD_FM_Entry
SCR_INT PAD_0837; // some more aircraft flags
SCR_BOOL RespawningToPreviousCheckpoint;
NIGHTCLUB_SALE NightclubSale;
uint64_t PAD_844[11]; // unused, all of them
uint64_t PAD_844;
SCR_INT SeatingIndex;
ARENA_WAR_DATA ArenaWarData; // @858 as of 1.67
uint64_t PAD_0861[2];
SCR_INT ApartmentEnterFlags;
SCR_VEC3 AvengerMissionStartPosition;
};
static_assert(sizeof(GPBD_FM_Entry) == 877 * 8);
static_assert(sizeof(GPBD_FM_Entry) == 883 * 8);

struct GPBD_FM
{
SCR_ARRAY<GPBD_FM_Entry, 32> Entries;
};
static_assert(sizeof(GPBD_FM) == 28065 * 8);
static_assert(sizeof(GPBD_FM) == 28257 * 8);
8 changes: 4 additions & 4 deletions script/globals/GPBD_FM_3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ struct BOSS_GOON
uint64_t PAD_0183[4]; // TODO some unknown contraband struct
VEHICLE_EXPORT VehicleExport;
uint64_t PAD_0193[12]; // TODO
SCR_ARRAY<uint64_t, 7> ActiveFreemodeEvents; // force thunder
SCR_ARRAY<uint64_t, 8> ActiveFreemodeEvents; // force thunder, size 7 -> 8 b3258
uint64_t PAD_0212[22]; // I'm not even going to bother with this one
HANGAR_CARGO HangarCargo;
uint64_t PAD_0236[23]; // not going to bother with this one either
Expand Down Expand Up @@ -280,7 +280,7 @@ struct BOSS_GOON
uint64_t PAD_0478[18]; // TODO
SCR_BOOL DoubleActionCacheLocationRevealed;
};
static_assert(sizeof(BOSS_GOON) == 498 * 8);
static_assert(sizeof(BOSS_GOON) == 499 * 8);

struct MC_STATS
{
Expand Down Expand Up @@ -348,10 +348,10 @@ struct GBPD_FM_3_Entry
SCR_INT CasinoFlowProgress;
SCR_ARRAY<uint64_t, 1> DailyObjectiveFlags; // @607 as of 1.67
};
static_assert(sizeof(GBPD_FM_3_Entry) == 609 * 8);
static_assert(sizeof(GBPD_FM_3_Entry) == 610 * 8);

struct GPBD_FM_3
{
SCR_ARRAY<GBPD_FM_3_Entry, 32> Entries;
};
static_assert(sizeof(GPBD_FM_3) == 19489 * 8);
static_assert(sizeof(GPBD_FM_3) == 19521 * 8);
2 changes: 1 addition & 1 deletion script/globals/GSBD_FM.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ struct GSBD_FM
BIKER_CONTRACTS_SERVER BikerContracts;
SCR_ARRAY<uint64_t, 32> DoubleActionCacheLocationRevealed;
};
static_assert(sizeof(GSBD_FM) == 642 * 8);
static_assert(sizeof(GSBD_FM) == 643 * 8);
8 changes: 5 additions & 3 deletions script/globals/GlobalPlayerBD.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ struct SMPL_INTERIOR_DATA
SCR_INT Flags5;
SCR_INT Flags6;
SCR_INT Flags7;
SCR_INT Flags8; // added b3258
alignas(8) eSimpleInteriorIndex Index;
SCR_INT InstanceId;
SCR_INT AllowedGoons;
Expand All @@ -496,7 +497,7 @@ struct SMPL_INTERIOR_DATA
SCR_INT MissionSpawnSimpleInteriorIndex;
SCR_INT InteriorSubtype; // nightclub vs nightclub garage etc
};
static_assert(sizeof(SMPL_INTERIOR_DATA) == 29 * 8);
static_assert(sizeof(SMPL_INTERIOR_DATA) == 30 * 8);

// yes there's a struct for leaving your clubhouse
struct LEAVE_CLUBHOUSE
Expand Down Expand Up @@ -546,6 +547,7 @@ struct GlobalPlayerBDEntry
NETWORK_INDEX DeliveryMechanicNetId4; // another one...
NETWORK_INDEX AcidLabNetId;
NETWORK_INDEX DeliveryBikeNetId;
NETWORK_INDEX BountyTransporterNetId; // added b3258
SCR_BOOL PAD_0057;
uint64_t PAD_0058[15]; // confirmed these are not used by PC scripts
PLAYER_BLIP PlayerBlip;
Expand Down Expand Up @@ -660,10 +662,10 @@ struct GlobalPlayerBDEntry
SCR_BOOL CanSpawnGunVan;
};

static_assert(sizeof(GlobalPlayerBDEntry) == 463 * 8);
static_assert(sizeof(GlobalPlayerBDEntry) == 465 * 8);

struct GlobalPlayerBD
{
SCR_ARRAY<GlobalPlayerBDEntry, 32> Entries;
};
static_assert(sizeof(GlobalPlayerBD) == 14817 * 8);
static_assert(sizeof(GlobalPlayerBD) == 14881 * 8);
32 changes: 16 additions & 16 deletions script/globals/g_AMC_playerBD.hpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#pragma once
#include "../types.hpp"
#include "../Timer.hpp"

struct g_AMC_playerBD_Entry
{
SCR_ARRAY<TIMER, NUM_CONTACTS> UsedContactServicesTimer; // only index 2 (mugger) is actually used by the scripts. the rest is just a waste of bandwidth
SCR_ARRAY<uint64_t, NUM_CONTACTS> ContactServiceCooldowns; // same as above
};
static_assert(sizeof(g_AMC_playerBD_Entry) == 242 * 8);

struct g_AMC_playerBD
{
SCR_ARRAY<g_AMC_playerBD_Entry, 32> Entries;
};
static_assert(sizeof(g_AMC_playerBD) == 7745 * 8);
#pragma once
#include "../types.hpp"
#include "../Timer.hpp"

struct g_AMC_playerBD_Entry
{
SCR_ARRAY<TIMER, NUM_CONTACTS> UsedContactServicesTimer; // only index 2 (mugger) is actually used by the scripts. the rest is just a waste of bandwidth
SCR_ARRAY<uint64_t, NUM_CONTACTS> ContactServiceCooldowns; // same as above
};
static_assert(sizeof(g_AMC_playerBD_Entry) == 245 * 8);

struct g_AMC_playerBD
{
SCR_ARRAY<g_AMC_playerBD_Entry, 32> Entries;
};
static_assert(sizeof(g_AMC_playerBD) == 7841 * 8);
Loading

0 comments on commit 3d41688

Please sign in to comment.