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.cpp | |
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.cpp')
-rw-r--r-- | NorthstarDLL/r2server.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/NorthstarDLL/r2server.cpp b/NorthstarDLL/r2server.cpp index 7a6ebe90..848104d4 100644 --- a/NorthstarDLL/r2server.cpp +++ b/NorthstarDLL/r2server.cpp @@ -7,7 +7,8 @@ using namespace R2; namespace R2
{
server_state_t* g_pServerState;
- Server_GetEntityByIndexType Server_GetEntityByIndex;
+ void* (*Server_GetEntityByIndex)(int index);
+ CBasePlayer*(__fastcall* UTIL_PlayerByIndex)(int playerIndex);
} // namespace R2
ON_DLL_LOAD("engine.dll", R2EngineServer, (HMODULE baseAddress))
@@ -17,5 +18,6 @@ ON_DLL_LOAD("engine.dll", R2EngineServer, (HMODULE baseAddress)) ON_DLL_LOAD("server.dll", R2GameServer, (HMODULE baseAddress))
{
- Server_GetEntityByIndex = (Server_GetEntityByIndexType)((char*)baseAddress + 0xFB820);
+ Server_GetEntityByIndex = (void*(*)(int))((char*)baseAddress + 0xFB820);
+ UTIL_PlayerByIndex = (CBasePlayer*(__fastcall*)(int))((char*)baseAddress + 0x26AA10);
}
\ No newline at end of file |