diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-05-12 15:25:08 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-05-12 15:25:08 +0100 |
commit | a526ad915694ce9881b7ff093cdab9587d088217 (patch) | |
tree | 4deacbfeedd0a8d937ab4747c2e2629e994ce7ec /NorthstarDedicatedTest/r2server.cpp | |
parent | 6768e46b200c63d758bd6e92bd500f3c754c3245 (diff) | |
download | NorthstarLauncher-a526ad915694ce9881b7ff093cdab9587d088217.tar.gz NorthstarLauncher-a526ad915694ce9881b7ff093cdab9587d088217.zip |
separate gameutils into multiple r2 headers
Diffstat (limited to 'NorthstarDedicatedTest/r2server.cpp')
-rw-r--r-- | NorthstarDedicatedTest/r2server.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/r2server.cpp b/NorthstarDedicatedTest/r2server.cpp new file mode 100644 index 00000000..c61e2d13 --- /dev/null +++ b/NorthstarDedicatedTest/r2server.cpp @@ -0,0 +1,21 @@ +#include "pch.h" +#include "r2server.h" + +using namespace R2; + +// use the R2 namespace for game funcs +namespace R2 +{ + server_state_t* g_pServerState; + Server_GetEntityByIndexType Server_GetEntityByIndex; +} // namespace R2 + +ON_DLL_LOAD("engine.dll", R2EngineServer, [](HMODULE baseAddress) +{ + g_pServerState = (server_state_t*)((char*)baseAddress + 0x12A53D48); +}) + +ON_DLL_LOAD("server.dll", R2GameServer, [](HMODULE baseAddress) +{ + Server_GetEntityByIndex = (Server_GetEntityByIndexType)((char*)baseAddress + 0xFB820); +})
\ No newline at end of file |