aboutsummaryrefslogtreecommitdiff
path: root/primedev
diff options
context:
space:
mode:
Diffstat (limited to 'primedev')
-rw-r--r--primedev/Northstar.cmake1
-rw-r--r--primedev/core/filesystem/filesystem.h15
-rw-r--r--primedev/core/structs.h77
-rw-r--r--primedev/engine/r2engine.h175
-rw-r--r--primedev/pch.h1
-rw-r--r--primedev/server/r2server.h337
6 files changed, 351 insertions, 255 deletions
diff --git a/primedev/Northstar.cmake b/primedev/Northstar.cmake
index 433326c2..8a4cec4e 100644
--- a/primedev/Northstar.cmake
+++ b/primedev/Northstar.cmake
@@ -51,7 +51,6 @@ add_library(
"core/memory.h"
"core/sourceinterface.cpp"
"core/sourceinterface.h"
- "core/structs.h"
"core/tier0.cpp"
"core/tier0.h"
"dedicated/dedicated.cpp"
diff --git a/primedev/core/filesystem/filesystem.h b/primedev/core/filesystem/filesystem.h
index fcd1bb2f..4e2c18d9 100644
--- a/primedev/core/filesystem/filesystem.h
+++ b/primedev/core/filesystem/filesystem.h
@@ -4,21 +4,6 @@
// taken from ttf2sdk
typedef void* FileHandle_t;
-#pragma pack(push, 1)
-
-// clang-format off
-OFFSET_STRUCT(VPKFileEntry)
-{
- STRUCT_SIZE(0x44);
- FIELDS(0x0,
- char* directory;
- char* filename;
- char* extension;
- )
-};
-// clang-format on
-#pragma pack(pop)
-
struct VPKData;
enum SearchPathAdd_t
diff --git a/primedev/core/structs.h b/primedev/core/structs.h
deleted file mode 100644
index 037233a6..00000000
--- a/primedev/core/structs.h
+++ /dev/null
@@ -1,77 +0,0 @@
-#pragma once
-//clang-format off
-// About this file:
-// This file contains several macros used to define reversed structs
-// The reason we use these macros is to make it easier to update existing structs
-// when new fields are reversed
-// This means we dont have to manually add padding, and recalculate when updating
-
-// Technical note:
-// While functionally, these structs act like a regular struct, they are actually
-// defined as unions with anonymous structs in them.
-// This means that each field is essentially an offset into a union.
-// We acknowledge that this goes against C++'s active-member guideline for unions
-// However, this is not such a big deal here as these structs will not be constructed
-
-// Usage:
-// To use these macros, define a struct like so:
-/*
-OFFSET_STRUCT(Name)
-{
- STRUCT_SIZE(0x100) // Total in-memory struct size
- FIELD(0x0, int field) // offset, signature
-}
-*/
-
-#define OFFSET_STRUCT(name) union name
-#define STRUCT_SIZE(size) char __size[size];
-#define STRUCT_FIELD_OFFSET(offset, signature) \
- struct \
- { \
- char CONCAT2(pad, __LINE__)[offset]; \
- signature; \
- };
-
-// Special case for a 0-offset field
-#define STRUCT_FIELD_NOOFFSET(offset, signature) signature;
-
-// Just puts two tokens next to each other, but
-// allows us to force the preprocessor to do another pass
-#define FX(f, x) f x
-
-// Macro used to detect if the given offset is 0 or not
-#define TEST_0 ,
-// MSVC does no preprocessing of integer literals.
-// On other compilers `0x0` gets processed into `0`
-#define TEST_0x0 ,
-
-// Concats the first and third argument and drops everything else
-// Used with preprocessor expansion in later passes to move the third argument to the fourth and change the value
-#define ZERO_P_I(a, b, c, ...) a##c
-
-// We use FX to prepare to use ZERO_P_I.
-// The right block contains 3 arguments:
-// NIF_
-// CONCAT2(TEST_, offset)
-// 1
-//
-// If offset is not 0 (or 0x0) the preprocessor replaces
-// it with nothing and the third argument stays 1
-//
-// If the offset is 0, TEST_0 expands to , and 1 becomes the fourth argument
-//
-// With those arguments we call ZERO_P_I and the first and third arugment get concat.
-// We either end up with:
-// NIF_ (if offset is 0) or
-// NIF_1 (if offset is not 0)
-#define IF_ZERO(m) FX(ZERO_P_I, (NIF_, CONCAT2(TEST_, m), 1))
-
-// These macros are used to branch after we processed if the offset is zero or not
-#define NIF_(t, ...) t
-#define NIF_1(t, ...) __VA_ARGS__
-
-// FIELD(S), generates an anonymous struct when a non 0 offset is given, otherwise just a signature
-#define FIELD(offset, signature) IF_ZERO(offset)(STRUCT_FIELD_NOOFFSET, STRUCT_FIELD_OFFSET)(offset, signature)
-#define FIELDS FIELD
-
-//clang-format on
diff --git a/primedev/engine/r2engine.h b/primedev/engine/r2engine.h
index e3bcc37e..c8b2e013 100644
--- a/primedev/engine/r2engine.h
+++ b/primedev/engine/r2engine.h
@@ -170,20 +170,50 @@ enum class eSignonState : int
CHANGELEVEL = 9, // server is changing level; please wait
};
-// clang-format off
-OFFSET_STRUCT(CBaseClient)
+class CBaseClient
{
- STRUCT_SIZE(0x2D728)
- FIELD(0x16, char m_Name[64])
- FIELD(0x258, KeyValues* m_ConVars)
- FIELD(0x2A0, eSignonState m_Signon)
- FIELD(0x358, char m_ClanTag[16])
- FIELD(0x484, bool m_bFakePlayer)
- FIELD(0x4A0, ePersistenceReady m_iPersistenceReady)
- FIELD(0x4FA, char m_PersistenceBuffer[PERSISTENCE_MAX_SIZE])
- FIELD(0xF500, char m_UID[32])
+public:
+ char _unk_0x0[22]; // 0x0 ( Size: 22 )
+ char m_Name[64]; // 0x16 ( Size: 64 )
+ char _unk_0x56[514]; // 0x56 ( Size: 514 )
+ KeyValues* m_ConVars; // 0x258 ( Size: 8 )
+ char _unk_0x260[64]; // 0x260 ( Size: 64 )
+ eSignonState m_Signon; // 0x2a0 ( Size: 4 )
+ int32_t m_nDeltaTick; // 0x2a4 ( Size: 4 )
+ uint64_t m_nOriginID; // 0x2a8 ( Size: 8 )
+ int32_t m_nStringTableAckTick; // 0x2b0 ( Size: 4 )
+ int32_t m_nSignonTick; // 0x2b4 ( Size: 4 )
+ char _unk_0x2b8[160]; // 0x2b8 ( Size: 180 )
+ char m_ClanTag[16]; // 0x358 ( Size: 16 )
+ char _unk_0x368[284]; // 0x368 ( Size: 284 )
+ bool m_bFakePlayer; // 0x484 ( Size: 1 )
+ bool m_bReceivedPacket; // 0x485 ( Size: 1 )
+ bool m_bLowViolence; // 0x486 ( Size: 1 )
+ bool m_bFullyAuthenticated; // 0x487 ( Size: 1 )
+ char _unk_0x488[24]; // 0x488 ( Size: 24 )
+ ePersistenceReady m_iPersistenceReady; // 0x4a0 ( Size: 1 )
+ char _unk_0x4a1[89]; // 0x4a1 ( Size: 89 )
+ char m_PersistenceBuffer[PERSISTENCE_MAX_SIZE]; // 0x4fa ( Size: 56781 )
+ char _unk_0xe2c7[4665]; // 0xe2c7 ( Size: 4665 )
+ char m_UID[32]; // 0xf500 ( Size: 32 )
+ char _unk_0xf520[123400]; // 0xf520 ( Size: 123400 )
};
-// clang-format on
+static_assert(sizeof(CBaseClient) == 0x2D728);
+static_assert(offsetof(CBaseClient, m_Name) == 0x16);
+static_assert(offsetof(CBaseClient, m_ConVars) == 0x258);
+static_assert(offsetof(CBaseClient, m_Signon) == 0x2A0);
+static_assert(offsetof(CBaseClient, m_nDeltaTick) == 0x2A4);
+static_assert(offsetof(CBaseClient, m_nOriginID) == 0x2A8);
+static_assert(offsetof(CBaseClient, m_nStringTableAckTick) == 0x2B0);
+static_assert(offsetof(CBaseClient, m_nSignonTick) == 0x2B4);
+static_assert(offsetof(CBaseClient, m_ClanTag) == 0x358);
+static_assert(offsetof(CBaseClient, m_bFakePlayer) == 0x484);
+static_assert(offsetof(CBaseClient, m_bReceivedPacket) == 0x485);
+static_assert(offsetof(CBaseClient, m_bLowViolence) == 0x486);
+static_assert(offsetof(CBaseClient, m_bFullyAuthenticated) == 0x487);
+static_assert(offsetof(CBaseClient, m_iPersistenceReady) == 0x4A0);
+static_assert(offsetof(CBaseClient, m_PersistenceBuffer) == 0x4FA);
+static_assert(offsetof(CBaseClient, m_UID) == 0xF500);
extern CBaseClient* g_pClientArray;
@@ -199,62 +229,73 @@ extern server_state_t* g_pServerState;
extern char* g_pModName;
-// clang-format off
-OFFSET_STRUCT(CGlobalVars)
+enum class GameMode_t : int
{
- FIELD(0x0,
- // Absolute time (per frame still - Use Plat_FloatTime() for a high precision real time
- // perf clock, but not that it doesn't obey host_timescale/host_framerate)
- double m_flRealTime);
-
- FIELDS(0x8,
- // Absolute frame counter - continues to increase even if game is paused
- int m_nFrameCount;
-
- // Non-paused frametime
- float m_flAbsoluteFrameTime;
-
- // Current time
- //
- // On the client, this (along with tickcount) takes a different meaning based on what
- // piece of code you're in:
- //
- // - While receiving network packets (like in PreDataUpdate/PostDataUpdate and proxies),
- // this is set to the SERVER TICKCOUNT for that packet. There is no interval between
- // the server ticks.
- // [server_current_Tick * tick_interval]
- //
- // - While rendering, this is the exact client clock
- // [client_current_tick * tick_interval + interpolation_amount]
- //
- // - During prediction, this is based on the client's current tick:
- // [client_current_tick * tick_interval]
- float m_flCurTime;
- )
-
- FIELDS(0x30,
- // Time spent on last server or client frame (has nothing to do with think intervals)
- float m_flFrameTime;
-
- // current maxplayers setting
- int m_nMaxClients;
- )
-
- FIELDS(0x3C,
- // Simulation ticks - does not increase when game is paused
- uint32_t m_nTickCount; // this is weird and doesn't seem to increase once per frame?
-
- // Simulation tick interval
- float m_flTickInterval;
- )
-
- FIELDS(0x60,
- const char* m_pMapName;
- int m_nMapVersion;
- )
-
- //FIELD(0x98, double m_flRealTime); // again?
+ NO_MODE = 0,
+ MP_MODE,
+ SP_MODE,
+};
+
+class CGlobalVars
+{
+public:
+ // Absolute time (per frame still - Use Plat_FloatTime() for a high precision real time
+ // perf clock, but not that it doesn't obey host_timescale/host_framerate)
+ double m_flRealTime; // 0x0 ( Size: 8 )
+
+ // Absolute frame counter - continues to increase even if game is paused
+ int m_nFrameCount; // 0x8 ( Size: 4 )
+
+ // Non-paused frametime
+ float m_flAbsoluteFrameTime; // 0xc ( Size: 4 )
+
+ // Current time
+ //
+ // On the client, this (along with tickcount) takes a different meaning based on what
+ // piece of code you're in:
+ //
+ // - While receiving network packets (like in PreDataUpdate/PostDataUpdate and proxies),
+ // this is set to the SERVER TICKCOUNT for that packet. There is no interval between
+ // the server ticks.
+ // [server_current_Tick * tick_interval]
+ //
+ // - While rendering, this is the exact client clock
+ // [client_current_tick * tick_interval + interpolation_amount]
+ //
+ // - During prediction, this is based on the client's current tick:
+ // [client_current_tick * tick_interval]
+ float m_flCurTime; // 0x10 ( Size: 4 )
+
+ char _unk_0x14[28]; // 0x14 ( Size: 28 )
+
+ // Time spent on last server or client frame (has nothing to do with think intervals)
+ float m_flFrameTime; // 0x30 ( Size: 4 )
+
+ // current maxplayers setting
+ int m_nMaxClients; // 0x34 ( Size: 4 )
+ GameMode_t m_nGameMode; // 0x38 ( Size: 4 )
+
+ // Simulation ticks - does not increase when game is paused
+ // this is weird and doesn't seem to increase once per frame?
+ uint32_t m_nTickCount; // 0x3c ( Size: 4 )
+
+ // Simulation tick interval
+ float m_flTickInterval; // 0x40 ( Size: 4 )
+ char _unk_0x44[28]; // 0x44 ( Size: 28 )
+
+ const char* m_pMapName; // 0x60 ( Size: 8 )
+ int m_nMapVersion; // 0x68 ( Size: 4 )
};
-// clang-format on
+static_assert(offsetof(CGlobalVars, m_flRealTime) == 0x0);
+static_assert(offsetof(CGlobalVars, m_nFrameCount) == 0x8);
+static_assert(offsetof(CGlobalVars, m_flAbsoluteFrameTime) == 0xc);
+static_assert(offsetof(CGlobalVars, m_flCurTime) == 0x10);
+static_assert(offsetof(CGlobalVars, m_flFrameTime) == 0x30);
+static_assert(offsetof(CGlobalVars, m_nMaxClients) == 0x34);
+static_assert(offsetof(CGlobalVars, m_nGameMode) == 0x38);
+static_assert(offsetof(CGlobalVars, m_nTickCount) == 0x3c);
+static_assert(offsetof(CGlobalVars, m_flTickInterval) == 0x40);
+static_assert(offsetof(CGlobalVars, m_pMapName) == 0x60);
+static_assert(offsetof(CGlobalVars, m_nMapVersion) == 0x68);
extern CGlobalVars* g_pGlobals;
diff --git a/primedev/pch.h b/primedev/pch.h
index b9ba0e08..8a03b857 100644
--- a/primedev/pch.h
+++ b/primedev/pch.h
@@ -31,7 +31,6 @@ typedef void (*callable_v)(void* v);
#include "core/macros.h"
-#include "core/structs.h"
#include "core/math/color.h"
#include "spdlog/spdlog.h"
diff --git a/primedev/server/r2server.h b/primedev/server/r2server.h
index c40cdc1f..1b7bc0b7 100644
--- a/primedev/server/r2server.h
+++ b/primedev/server/r2server.h
@@ -6,101 +6,250 @@
class CBaseEntity;
extern CBaseEntity* (*Server_GetEntityByIndex)(int index);
-// clang-format off
-OFFSET_STRUCT(CBasePlayer)
+#pragma pack(push, 1)
+class CBasePlayer
{
- FIELD(0x58, uint32_t m_nPlayerIndex)
-
- FIELD(0x23E8, bool m_grappleActive)
- FIELD(0x1D08, uint32_t m_platformUserId)
- FIELD(0x1D10, int32_t m_classModsActive)
- FIELD(0x1D8C, int32_t m_posClassModsActive)
- FIELD(0x1DCC, bool m_passives)
- FIELD(0x4948, int32_t m_selectedOffhand)
- FIELD(0x1358, int32_t m_selectedOffhandPendingHybridAction)
- FIELD(0x1E88, int32_t m_playerFlags)
- FIELD(0x26A8, int32_t m_lastUCmdSimulationTicks)
- FIELD(0x26AC, float m_lastUCmdSimulationRemainderTime)
- FIELD(0x1F04, int32_t m_remoteTurret)
- FIELD(0x414, int32_t m_hGroundEntity)
- FIELD(0x13B8, int32_t m_titanSoul)
- FIELD(0x2054, int32_t m_petTitan)
- FIELD(0x4D4, int32_t m_iHealth)
- FIELD(0x4D0, int32_t m_iMaxHealth)
- FIELD(0x4F1, int32_t m_lifeState)
- FIELD(0x50C, float m_flMaxspeed)
- FIELD(0x298, int32_t m_fFlags)
- FIELD(0x1F64, int32_t m_iObserverMode)
- FIELD(0x1F6C, int32_t m_hObserverTarget)
- FIELD(0x2098, int32_t m_hViewModel)
- FIELD(0x27E4, int32_t m_ubEFNointerpParity)
- FIELD(0x1FA4, int32_t m_activeBurnCardIndex)
- FIELD(0x1B68, int32_t m_hColorCorrectionCtrl)
- FIELD(0x19E0, int32_t m_PlayerFog__m_hCtrl)
- FIELD(0x26BC, bool m_bShouldDrawPlayerWhileUsingViewEntity)
- FIELD(0x2848, char m_title[32])
- FIELD(0x2964, bool m_useCredit)
- FIELD(0x1F40, float m_damageImpulseNoDecelEndTime)
- FIELD(0x1E8C, bool m_hasMic)
- FIELD(0x1E8D, bool m_inPartyChat)
- FIELD(0x1E90, float m_playerMoveSpeedScale)
- FIELD(0x1F58, float m_flDeathTime)
- FIELD(0x25A8, bool m_iSpawnParity)
- FIELD(0x102284, Vector3 m_upDir)
- FIELD(0x259C, float m_lastDodgeTime)
- FIELD(0x22E0, bool m_wallHanging)
- FIELD(0x22EC, int32_t m_traversalType)
- FIELD(0x22F0, int32_t m_traversalState)
- FIELD(0x2328, Vector3 m_traversalRefPos)
- FIELD(0x231C, Vector3 m_traversalForwardDir)
- FIELD(0x2354, float m_traversalYawDelta)
- FIELD(0x2358, int32_t m_traversalYawPoseParameter)
- FIELD(0x2050, int32_t m_grappleHook)
- FIELD(0x27C0, int32_t m_autoSprintForced)
- FIELD(0x27C4, bool m_fIsSprinting)
- FIELD(0x27CC, float m_sprintStartedTime)
- FIELD(0x27D0, float m_sprintStartedFrac)
- FIELD(0x27D4, float m_sprintEndedTime)
- FIELD(0x27D8, float m_sprintEndedFrac)
- FIELD(0x27DC, float m_stickySprintStartTime)
- FIELD(0x2998, float m_smartAmmoPreviousHighestLockOnMeFractionValue)
- FIELD(0x23FC, int32_t m_activeZipline)
- FIELD(0x2400, bool m_ziplineReverse)
- FIELD(0x2410, int32_t m_ziplineState)
- FIELD(0x2250, int32_t m_duckState)
- FIELD(0x2254, Vector3 m_StandHullMin)
- FIELD(0x2260, Vector3 m_StandHullMax)
- FIELD(0x226C, Vector3 m_DuckHullMin)
- FIELD(0x2278, Vector3 m_DuckHullMax)
- FIELD(0x205C, int32_t m_xp)
- FIELD(0x2060, int32_t m_generation)
- FIELD(0x2064, int32_t m_rank)
- FIELD(0x2068, int32_t m_serverForceIncreasePlayerListGenerationParity)
- FIELD(0x206C, bool m_isPlayingRanked)
- FIELD(0x2070, float m_skill_mu)
- FIELD(0x1E80, int32_t m_titanSoulBeingRodeoed)
- FIELD(0x1E84, int32_t m_entitySyncingWithMe)
- FIELD(0x2078, float m_nextTitanRespawnAvailable)
- FIELD(0x1C90, bool m_hasBadReputation)
- FIELD(0x1C91, char m_communityName[64])
- FIELD(0x1CD1, char m_communityClanTag[16])
- FIELD(0x1CE1, char m_factionName[16])
- FIELD(0x1CF1, char m_hardwareIcon[16])
- FIELD(0x1D01, bool m_happyHourActive)
- FIELD(0x1EF4, int32_t m_gestureAutoKillBitfield)
- FIELD(0x2EA8, int32_t m_pilotClassIndex)
- FIELD(0x100490, Vector3 m_vecAbsOrigin)
- FIELD(0x25BE, bool m_isPerformingBoostAction)
- FIELD(0x240C, bool m_ziplineValid3pWeaponLayerAnim)
- FIELD(0x345C, int32_t m_playerScriptNetDataGlobal)
- FIELD(0x1598, int32_t m_bZooming)
- FIELD(0x1599, bool m_zoomToggleOn)
- FIELD(0x159C, float m_zoomBaseFrac)
- FIELD(0x15A0, float m_zoomBaseTime)
- FIELD(0x15A4, float m_zoomFullStartTime)
- FIELD(0xA04, int32_t m_camoIndex)
- FIELD(0xA08, int32_t m_decalIndex)
+public:
+ char _unk_0x0[88]; // 0x0 ( Size: 88 )
+ uint32_t m_nPlayerIndex; // 0x58 ( Size: 4 )
+ char _unk_0x5c[572]; // 0x5c ( Size: 572 )
+ int32_t m_fFlags; // 0x298 ( Size: 4 )
+ char _unk_0x29c[376]; // 0x29c ( Size: 376 )
+ int32_t m_hGroundEntity; // 0x414 ( Size: 4 )
+ char _unk_0x418[184]; // 0x418 ( Size: 184 )
+ int32_t m_iMaxHealth; // 0x4d0 ( Size: 4 )
+ int32_t m_iHealth; // 0x4d4 ( Size: 4 )
+ char _unk_0x4d8[25]; // 0x4d8 ( Size: 25 )
+ int32_t m_lifeState; // 0x4f1 ( Size: 4 )
+ char _unk_0x4f5[23]; // 0x4f5 ( Size: 23 )
+ float m_flMaxspeed; // 0x50c ( Size: 4 )
+ char _unk_0x510[1268]; // 0x510 ( Size: 1268 )
+ int32_t m_camoIndex; // 0xa04 ( Size: 4 )
+ int32_t m_decalIndex; // 0xa08 ( Size: 4 )
+ char _unk_0xa0c[2380]; // 0xa0c ( Size: 2380 )
+ int32_t m_selectedOffhandPendingHybridAction; // 0x1358 ( Size: 4 )
+ char _unk_0x135c[92]; // 0x135c ( Size: 92 )
+ int32_t m_titanSoul; // 0x13b8 ( Size: 4 )
+ char _unk_0x13bc[476]; // 0x13bc ( Size: 476 )
+ bool m_bZooming; // 0x1598 ( Size: 1 )
+ bool m_zoomToggleOn; // 0x1599 ( Size: 1 )
+ char _unk_0x159a[2]; // 0x159a ( Size: 2 )
+ float m_zoomBaseFrac; // 0x159c ( Size: 4 )
+ float m_zoomBaseTime; // 0x15a0 ( Size: 4 )
+ float m_zoomFullStartTime; // 0x15a4 ( Size: 4 )
+ char _unk_0x15a8[1080]; // 0x15a8 ( Size: 1080 )
+ int32_t m_PlayerFog__m_hCtrl; // 0x19e0 ( Size: 4 )
+ char _unk_0x19e4[388]; // 0x19e4 ( Size: 388 )
+ int32_t m_hColorCorrectionCtrl; // 0x1b68 ( Size: 4 )
+ char _unk_0x1b6c[292]; // 0x1b6c ( Size: 292 )
+ bool m_hasBadReputation; // 0x1c90 ( Size: 1 )
+ char m_communityName[64]; // 0x1c91 ( Size: 64 )
+ char m_communityClanTag[16]; // 0x1cd1 ( Size: 16 )
+ char m_factionName[16]; // 0x1ce1 ( Size: 16 )
+ char m_hardwareIcon[16]; // 0x1cf1 ( Size: 16 )
+ bool m_happyHourActive; // 0x1d01 ( Size: 1 )
+ char _unk_0x1d02[6]; // 0x1d02 ( Size: 6 )
+ uint32_t m_platformUserId; // 0x1d08 ( Size: 4 )
+ char _unk_0x1d0c[4]; // 0x1d0c ( Size: 4 )
+ int32_t m_classModsActive; // 0x1d10 ( Size: 4 )
+ char _unk_0x1d14[120]; // 0x1d14 ( Size: 120 )
+ int32_t m_posClassModsActive; // 0x1d8c ( Size: 4 )
+ char _unk_0x1d90[60]; // 0x1d90 ( Size: 60 )
+ bool m_passives; // 0x1dcc ( Size: 1 )
+ char _unk_0x1dcd[179]; // 0x1dcd ( Size: 179 )
+ int32_t m_titanSoulBeingRodeoed; // 0x1e80 ( Size: 4 )
+ int32_t m_entitySyncingWithMe; // 0x1e84 ( Size: 4 )
+ int32_t m_playerFlags; // 0x1e88 ( Size: 4 )
+ bool m_hasMic; // 0x1e8c ( Size: 1 )
+ bool m_inPartyChat; // 0x1e8d ( Size: 1 )
+ char _unk_0x1e8e[2]; // 0x1e8e ( Size: 2 )
+ float m_playerMoveSpeedScale; // 0x1e90 ( Size: 4 )
+ char _unk_0x1e94[96]; // 0x1e94 ( Size: 96 )
+ int32_t m_gestureAutoKillBitfield; // 0x1ef4 ( Size: 4 )
+ char _unk_0x1ef8[12]; // 0x1ef8 ( Size: 12 )
+ int32_t m_remoteTurret; // 0x1f04 ( Size: 4 )
+ char _unk_0x1f08[56]; // 0x1f08 ( Size: 56 )
+ float m_damageImpulseNoDecelEndTime; // 0x1f40 ( Size: 4 )
+ char _unk_0x1f44[20]; // 0x1f44 ( Size: 20 )
+ float m_flDeathTime; // 0x1f58 ( Size: 4 )
+ char _unk_0x1f5c[8]; // 0x1f5c ( Size: 8 )
+ int32_t m_iObserverMode; // 0x1f64 ( Size: 4 )
+ char _unk_0x1f68[4]; // 0x1f68 ( Size: 4 )
+ int32_t m_hObserverTarget; // 0x1f6c ( Size: 4 )
+ char _unk_0x1f70[52]; // 0x1f70 ( Size: 52 )
+ int32_t m_activeBurnCardIndex; // 0x1fa4 ( Size: 4 )
+ char _unk_0x1fa8[168]; // 0x1fa8 ( Size: 168 )
+ int32_t m_grappleHook; // 0x2050 ( Size: 4 )
+ int32_t m_petTitan; // 0x2054 ( Size: 4 )
+ char _unk_0x2058[4]; // 0x2058 ( Size: 4 )
+ int32_t m_xp; // 0x205c ( Size: 4 )
+ int32_t m_generation; // 0x2060 ( Size: 4 )
+ int32_t m_rank; // 0x2064 ( Size: 4 )
+ int32_t m_serverForceIncreasePlayerListGenerationParity; // 0x2068 ( Size: 4 )
+ bool m_isPlayingRanked; // 0x206c ( Size: 1 )
+ char _unk_0x206d[3]; // 0x206d ( Size: 3 )
+ float m_skill_mu; // 0x2070 ( Size: 4 )
+ char _unk_0x2074[4]; // 0x2074 ( Size: 4 )
+ float m_nextTitanRespawnAvailable; // 0x2078 ( Size: 4 )
+ char _unk_0x207c[28]; // 0x207c ( Size: 28 )
+ int32_t m_hViewModel; // 0x2098 ( Size: 4 )
+ char _unk_0x209c[436]; // 0x209c ( Size: 436 )
+ int32_t m_duckState; // 0x2250 ( Size: 4 )
+ Vector3 m_StandHullMin; // 0x2254 ( Size: 12 )
+ Vector3 m_StandHullMax; // 0x2260 ( Size: 12 )
+ Vector3 m_DuckHullMin; // 0x226c ( Size: 12 )
+ Vector3 m_DuckHullMax; // 0x2278 ( Size: 12 )
+ char _unk_0x2284[92]; // 0x2284 ( Size: 92 )
+ bool m_wallHanging; // 0x22e0 ( Size: 1 )
+ char _unk_0x22e1[11]; // 0x22e1 ( Size: 11 )
+ int32_t m_traversalType; // 0x22ec ( Size: 4 )
+ int32_t m_traversalState; // 0x22f0 ( Size: 4 )
+ char _unk_0x22f4[40]; // 0x22f4 ( Size: 40 )
+ Vector3 m_traversalForwardDir; // 0x231c ( Size: 12 )
+ Vector3 m_traversalRefPos; // 0x2328 ( Size: 12 )
+ char _unk_0x2334[32]; // 0x2334 ( Size: 32 )
+ float m_traversalYawDelta; // 0x2354 ( Size: 4 )
+ int32_t m_traversalYawPoseParameter; // 0x2358 ( Size: 4 )
+ char _unk_0x235c[140]; // 0x235c ( Size: 140 )
+ bool m_grappleActive; // 0x23e8 ( Size: 1 )
+ char _unk_0x23e9[19]; // 0x23e9 ( Size: 19 )
+ int32_t m_activeZipline; // 0x23fc ( Size: 4 )
+ bool m_ziplineReverse; // 0x2400 ( Size: 1 )
+ char _unk_0x2401[11]; // 0x2401 ( Size: 11 )
+ bool m_ziplineValid3pWeaponLayerAnim; // 0x240c ( Size: 1 )
+ char _unk_0x240d[3]; // 0x240d ( Size: 3 )
+ int32_t m_ziplineState; // 0x2410 ( Size: 4 )
+ char _unk_0x2414[392]; // 0x2414 ( Size: 392 )
+ float m_lastDodgeTime; // 0x259c ( Size: 4 )
+ char _unk_0x25a0[8]; // 0x25a0 ( Size: 8 )
+ bool m_iSpawnParity; // 0x25a8 ( Size: 1 )
+ char _unk_0x25a9[21]; // 0x25a9 ( Size: 21 )
+ bool m_isPerformingBoostAction; // 0x25be ( Size: 1 )
+ char _unk_0x25bf[233]; // 0x25bf ( Size: 233 )
+ int32_t m_lastUCmdSimulationTicks; // 0x26a8 ( Size: 4 )
+ float m_lastUCmdSimulationRemainderTime; // 0x26ac ( Size: 4 )
+ char _unk_0x26b0[12]; // 0x26b0 ( Size: 12 )
+ bool m_bShouldDrawPlayerWhileUsingViewEntity; // 0x26bc ( Size: 1 )
+ char _unk_0x26bd[259]; // 0x26bd ( Size: 259 )
+ int32_t m_autoSprintForced; // 0x27c0 ( Size: 4 )
+ bool m_fIsSprinting; // 0x27c4 ( Size: 1 )
+ char _unk_0x27c5[7]; // 0x27c5 ( Size: 7 )
+ float m_sprintStartedTime; // 0x27cc ( Size: 4 )
+ float m_sprintStartedFrac; // 0x27d0 ( Size: 4 )
+ float m_sprintEndedTime; // 0x27d4 ( Size: 4 )
+ float m_sprintEndedFrac; // 0x27d8 ( Size: 4 )
+ float m_stickySprintStartTime; // 0x27dc ( Size: 4 )
+ char _unk_0x27e0[4]; // 0x27e0 ( Size: 4 )
+ int32_t m_ubEFNointerpParity; // 0x27e4 ( Size: 4 )
+ char _unk_0x27e8[96]; // 0x27e8 ( Size: 96 )
+ char m_title[32]; // 0x2848 ( Size: 32 )
+ char _unk_0x2868[252]; // 0x2868 ( Size: 252 )
+ bool m_useCredit; // 0x2964 ( Size: 1 )
+ char _unk_0x2965[51]; // 0x2965 ( Size: 51 )
+ float m_smartAmmoPreviousHighestLockOnMeFractionValue; // 0x2998 ( Size: 4 )
+ char _unk_0x299c[1292]; // 0x299c ( Size: 1292 )
+ int32_t m_pilotClassIndex; // 0x2ea8 ( Size: 4 )
+ char _unk_0x2eac[1456]; // 0x2eac ( Size: 1456 )
+ int32_t m_playerScriptNetDataGlobal; // 0x345c ( Size: 4 )
+ char _unk_0x3460[5352]; // 0x3460 ( Size: 5352 )
+ int32_t m_selectedOffhand; // 0x4948 ( Size: 4 )
+ char _unk_0x494c[1030980]; // 0x494c ( Size: 1030980 )
+ Vector3 m_vecAbsOrigin; // 0x100490 ( Size: 12 )
+ char _unk_0x10049c[7656]; // 0x10049c ( Size: 7656 )
+ Vector3 m_upDir; // 0x102284 ( Size: 12 )
};
-// clang-format on
+#pragma pack(pop)
+
+static_assert(offsetof(CBasePlayer, m_nPlayerIndex) == 0x58);
+
+static_assert(offsetof(CBasePlayer, m_grappleActive) == 0x23e8);
+static_assert(offsetof(CBasePlayer, m_platformUserId) == 0x1D08);
+static_assert(offsetof(CBasePlayer, m_classModsActive) == 0x1D10);
+static_assert(offsetof(CBasePlayer, m_posClassModsActive) == 0x1D8C);
+static_assert(offsetof(CBasePlayer, m_passives) == 0x1DCC);
+static_assert(offsetof(CBasePlayer, m_selectedOffhand) == 0x4948);
+static_assert(offsetof(CBasePlayer, m_selectedOffhandPendingHybridAction) == 0x1358);
+static_assert(offsetof(CBasePlayer, m_playerFlags) == 0x1E88);
+static_assert(offsetof(CBasePlayer, m_lastUCmdSimulationTicks) == 0x26A8);
+static_assert(offsetof(CBasePlayer, m_lastUCmdSimulationRemainderTime) == 0x26AC);
+static_assert(offsetof(CBasePlayer, m_remoteTurret) == 0x1F04);
+static_assert(offsetof(CBasePlayer, m_hGroundEntity) == 0x414);
+static_assert(offsetof(CBasePlayer, m_titanSoul) == 0x13B8);
+static_assert(offsetof(CBasePlayer, m_petTitan) == 0x2054);
+static_assert(offsetof(CBasePlayer, m_iHealth) == 0x4D4);
+static_assert(offsetof(CBasePlayer, m_iMaxHealth) == 0x4D0);
+static_assert(offsetof(CBasePlayer, m_lifeState) == 0x4F1);
+static_assert(offsetof(CBasePlayer, m_flMaxspeed) == 0x50C);
+static_assert(offsetof(CBasePlayer, m_fFlags) == 0x298);
+static_assert(offsetof(CBasePlayer, m_iObserverMode) == 0x1F64);
+static_assert(offsetof(CBasePlayer, m_hObserverTarget) == 0x1F6C);
+static_assert(offsetof(CBasePlayer, m_hViewModel) == 0x2098);
+static_assert(offsetof(CBasePlayer, m_ubEFNointerpParity) == 0x27E4);
+static_assert(offsetof(CBasePlayer, m_activeBurnCardIndex) == 0x1FA4);
+static_assert(offsetof(CBasePlayer, m_hColorCorrectionCtrl) == 0x1B68);
+static_assert(offsetof(CBasePlayer, m_PlayerFog__m_hCtrl) == 0x19E0);
+static_assert(offsetof(CBasePlayer, m_bShouldDrawPlayerWhileUsingViewEntity) == 0x26BC);
+static_assert(offsetof(CBasePlayer, m_title) == 0x2848);
+static_assert(offsetof(CBasePlayer, m_useCredit) == 0x2964);
+static_assert(offsetof(CBasePlayer, m_damageImpulseNoDecelEndTime) == 0x1F40);
+static_assert(offsetof(CBasePlayer, m_hasMic) == 0x1E8C);
+static_assert(offsetof(CBasePlayer, m_inPartyChat) == 0x1E8D);
+static_assert(offsetof(CBasePlayer, m_playerMoveSpeedScale) == 0x1E90);
+static_assert(offsetof(CBasePlayer, m_flDeathTime) == 0x1F58);
+static_assert(offsetof(CBasePlayer, m_iSpawnParity) == 0x25A8);
+static_assert(offsetof(CBasePlayer, m_upDir) == 0x102284);
+static_assert(offsetof(CBasePlayer, m_lastDodgeTime) == 0x259C);
+static_assert(offsetof(CBasePlayer, m_wallHanging) == 0x22E0);
+static_assert(offsetof(CBasePlayer, m_traversalType) == 0x22EC);
+static_assert(offsetof(CBasePlayer, m_traversalState) == 0x22F0);
+static_assert(offsetof(CBasePlayer, m_traversalRefPos) == 0x2328);
+static_assert(offsetof(CBasePlayer, m_traversalForwardDir) == 0x231C);
+static_assert(offsetof(CBasePlayer, m_traversalYawDelta) == 0x2354);
+static_assert(offsetof(CBasePlayer, m_traversalYawPoseParameter) == 0x2358);
+static_assert(offsetof(CBasePlayer, m_grappleHook) == 0x2050);
+static_assert(offsetof(CBasePlayer, m_autoSprintForced) == 0x27C0);
+static_assert(offsetof(CBasePlayer, m_fIsSprinting) == 0x27C4);
+static_assert(offsetof(CBasePlayer, m_sprintStartedTime) == 0x27CC);
+static_assert(offsetof(CBasePlayer, m_sprintStartedFrac) == 0x27D0);
+static_assert(offsetof(CBasePlayer, m_sprintEndedTime) == 0x27D4);
+static_assert(offsetof(CBasePlayer, m_sprintEndedFrac) == 0x27D8);
+static_assert(offsetof(CBasePlayer, m_stickySprintStartTime) == 0x27DC);
+static_assert(offsetof(CBasePlayer, m_smartAmmoPreviousHighestLockOnMeFractionValue) == 0x2998);
+static_assert(offsetof(CBasePlayer, m_activeZipline) == 0x23FC);
+static_assert(offsetof(CBasePlayer, m_ziplineReverse) == 0x2400);
+static_assert(offsetof(CBasePlayer, m_ziplineState) == 0x2410);
+static_assert(offsetof(CBasePlayer, m_duckState) == 0x2250);
+static_assert(offsetof(CBasePlayer, m_StandHullMin) == 0x2254);
+static_assert(offsetof(CBasePlayer, m_StandHullMax) == 0x2260);
+static_assert(offsetof(CBasePlayer, m_DuckHullMin) == 0x226C);
+static_assert(offsetof(CBasePlayer, m_DuckHullMax) == 0x2278);
+static_assert(offsetof(CBasePlayer, m_xp) == 0x205C);
+static_assert(offsetof(CBasePlayer, m_generation) == 0x2060);
+static_assert(offsetof(CBasePlayer, m_rank) == 0x2064);
+static_assert(offsetof(CBasePlayer, m_serverForceIncreasePlayerListGenerationParity) == 0x2068);
+static_assert(offsetof(CBasePlayer, m_isPlayingRanked) == 0x206C);
+static_assert(offsetof(CBasePlayer, m_skill_mu) == 0x2070);
+static_assert(offsetof(CBasePlayer, m_titanSoulBeingRodeoed) == 0x1E80);
+static_assert(offsetof(CBasePlayer, m_entitySyncingWithMe) == 0x1E84);
+static_assert(offsetof(CBasePlayer, m_nextTitanRespawnAvailable) == 0x2078);
+static_assert(offsetof(CBasePlayer, m_hasBadReputation) == 0x1C90);
+static_assert(offsetof(CBasePlayer, m_communityName) == 0x1C91);
+static_assert(offsetof(CBasePlayer, m_communityClanTag) == 0x1CD1);
+static_assert(offsetof(CBasePlayer, m_factionName) == 0x1CE1);
+static_assert(offsetof(CBasePlayer, m_hardwareIcon) == 0x1CF1);
+static_assert(offsetof(CBasePlayer, m_happyHourActive) == 0x1D01);
+static_assert(offsetof(CBasePlayer, m_gestureAutoKillBitfield) == 0x1EF4);
+static_assert(offsetof(CBasePlayer, m_pilotClassIndex) == 0x2EA8);
+static_assert(offsetof(CBasePlayer, m_vecAbsOrigin) == 0x100490);
+static_assert(offsetof(CBasePlayer, m_isPerformingBoostAction) == 0x25BE);
+static_assert(offsetof(CBasePlayer, m_ziplineValid3pWeaponLayerAnim) == 0x240C);
+static_assert(offsetof(CBasePlayer, m_playerScriptNetDataGlobal) == 0x345C);
+static_assert(offsetof(CBasePlayer, m_bZooming) == 0x1598);
+static_assert(offsetof(CBasePlayer, m_zoomToggleOn) == 0x1599);
+static_assert(offsetof(CBasePlayer, m_zoomBaseFrac) == 0x159C);
+static_assert(offsetof(CBasePlayer, m_zoomBaseTime) == 0x15A0);
+static_assert(offsetof(CBasePlayer, m_zoomFullStartTime) == 0x15A4);
+static_assert(offsetof(CBasePlayer, m_camoIndex) == 0xA04);
+static_assert(offsetof(CBasePlayer, m_decalIndex) == 0xA08);
extern CBasePlayer*(__fastcall* UTIL_PlayerByIndex)(int playerIndex);