From f230156cbebc1b93db5e254410ee2ab3a8dcb27c Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Mon, 9 May 2022 00:40:53 +0100 Subject: use in-file macros rather than global funcs for registering dll load callbacks --- NorthstarDedicatedTest/playlist.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'NorthstarDedicatedTest/playlist.cpp') 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 -- cgit v1.2.3