aboutsummaryrefslogtreecommitdiff
path: root/primedev/shared/maxplayers.cpp
diff options
context:
space:
mode:
authorJack <66967891+ASpoonPlaysGames@users.noreply.github.com>2024-03-04 00:01:32 +0000
committerGitHub <noreply@github.com>2024-03-04 01:01:32 +0100
commit4b0726d97788edff5d83476cb52057f409d623af (patch)
treedad38132c6353af708a71af8e795aa34a19b4b3a /primedev/shared/maxplayers.cpp
parente1eb2a6f4b858e903603226098861c3b62d5d1a4 (diff)
downloadNorthstarLauncher-4b0726d97788edff5d83476cb52057f409d623af.tar.gz
NorthstarLauncher-4b0726d97788edff5d83476cb52057f409d623af.zip
Update silver-bun to `72c74b4` (#664)
Bumps the vendored silver-bun library to the newest commit in upstream Co-authored-by: F1F7Y <filip.bartos07@proton.me> Co-authored-by: IcePixelx <41352111+IcePixelx@users.noreply.github.com>
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