diff options
author | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2022-07-12 14:05:02 +0100 |
---|---|---|
committer | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2022-07-12 14:05:02 +0100 |
commit | 6ae30c9b15fcc200c7b642016e7adbfdf9b979f4 (patch) | |
tree | f645afba242a092e1e920582f37ae396e35b5e06 /NorthstarDLL/r2server.h | |
parent | 1068b3daeb95322461e69a2d8f0203309bd22830 (diff) | |
download | NorthstarLauncher-6ae30c9b15fcc200c7b642016e7adbfdf9b979f4.tar.gz NorthstarLauncher-6ae30c9b15fcc200c7b642016e7adbfdf9b979f4.zip |
move exploit prevention and limits code out of serverauthentication, and have actual defs for CBasePlayer
Diffstat (limited to 'NorthstarDLL/r2server.h')
-rw-r--r-- | NorthstarDLL/r2server.h | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/NorthstarDLL/r2server.h b/NorthstarDLL/r2server.h index 816adc82..c032d722 100644 --- a/NorthstarDLL/r2server.h +++ b/NorthstarDLL/r2server.h @@ -14,6 +14,44 @@ namespace R2 extern server_state_t* g_pServerState;
// server entity stuff
- typedef void* (*Server_GetEntityByIndexType)(int index);
- extern Server_GetEntityByIndexType Server_GetEntityByIndex;
+ extern void* (*Server_GetEntityByIndex)(int index);
+
+ const int PERSISTENCE_MAX_SIZE = 0xD000;
+
+ enum class ePersistenceReady : char
+ {
+ NOT_READY,
+ READY = 3,
+ READY_LOCAL = 3,
+ READY_REMOTE
+ };
+
+ #pragma pack(push, 1)
+ struct CBasePlayer
+ {
+ char pad0[0x16];
+
+ // +0x16
+ char m_Name[64];
+ // +0x56
+
+ char pad1[0x44A];
+
+ // +0x4A0
+ ePersistenceReady m_iPersistenceReady;
+ // +0x4A1
+
+ char pad2[0x59];
+
+ // +0x4FA
+ char m_PersistenceBuffer[PERSISTENCE_MAX_SIZE];
+
+ char pad3[0x2006];
+
+ // +0xF500
+ char m_UID[32];
+ };
+ #pragma pack(pop)
+
+ extern CBasePlayer*(__fastcall* UTIL_PlayerByIndex)(int playerIndex);
} // namespace R2
\ No newline at end of file |