aboutsummaryrefslogtreecommitdiff
path: root/primedev/shared/maxplayers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'primedev/shared/maxplayers.cpp')
-rw-r--r--primedev/shared/maxplayers.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/primedev/shared/maxplayers.cpp b/primedev/shared/maxplayers.cpp
index 711193d4..69d625f2 100644
--- a/primedev/shared/maxplayers.cpp
+++ b/primedev/shared/maxplayers.cpp
@@ -60,7 +60,7 @@ int GetMaxPlayers()
return 32;
}
-template <class T> void ChangeOffset(CMemoryAddress addr, unsigned int offset)
+template <class T> void ChangeOffset(CMemory addr, unsigned int offset)
{
addr.Patch((BYTE*)&offset, sizeof(T));
}
@@ -296,7 +296,7 @@ ON_DLL_LOAD("server.dll", MaxPlayersOverride_Server, (CModule module))
AUTOHOOK_DISPATCH_MODULE(server.dll)
// get required data
- serverBase = (HMODULE)module.m_nAddress;
+ serverBase = (HMODULE)module.GetModuleBase();
RandomIntZeroMax = (decltype(RandomIntZeroMax))(GetProcAddress(GetModuleHandleA("vstdlib.dll"), "RandomIntZeroMax"));
// patch max players amount