aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/playlist.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-05-09 00:40:53 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-05-09 00:40:53 +0100
commitf230156cbebc1b93db5e254410ee2ab3a8dcb27c (patch)
treee98c72fabbff37a55e7f9216c52e4f8ef2084073 /NorthstarDedicatedTest/playlist.cpp
parent6c8112a6c368dd36d21fd94689e9682bc3b012a5 (diff)
downloadNorthstarLauncher-f230156cbebc1b93db5e254410ee2ab3a8dcb27c.tar.gz
NorthstarLauncher-f230156cbebc1b93db5e254410ee2ab3a8dcb27c.zip
use in-file macros rather than global funcs for registering dll load callbacks
Diffstat (limited to 'NorthstarDedicatedTest/playlist.cpp')
-rw-r--r--NorthstarDedicatedTest/playlist.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/NorthstarDedicatedTest/playlist.cpp b/NorthstarDedicatedTest/playlist.cpp
index fdb23893..c1598825 100644
--- a/NorthstarDedicatedTest/playlist.cpp
+++ b/NorthstarDedicatedTest/playlist.cpp
@@ -1,5 +1,6 @@
#include "pch.h"
#include "playlist.h"
+#include "hooks.h"
#include "concommand.h"
#include "convar.h"
#include "gameutils.h"
@@ -72,7 +73,7 @@ int GetCurrentGamemodeMaxPlayersHook()
}
#include "NSMem.h"
-void InitialisePlaylistHooks(HMODULE baseAddress)
+ON_DLL_LOAD_RELIESON("engine.dll", PlaylistHooks, ConCommand, (HMODULE baseAddress)
{
RegisterConCommand("setplaylist", SetPlaylistCommand, "Sets the current playlist", FCVAR_NONE);
RegisterConCommand("setplaylistvaroverrides", SetPlaylistVarOverrideCommand, "sets a playlist var override", FCVAR_NONE);
@@ -103,4 +104,4 @@ void InitialisePlaylistHooks(HMODULE baseAddress)
// patch to allow setplaylistvaroverride to be called before map init on dedicated and private match launched through the game
NSMem::NOP(ba + 0x18ED17, 6);
-} \ No newline at end of file
+}) \ No newline at end of file