From 52dc6d143fec8eabb9958bacbdbf6f1b4b4af592 Mon Sep 17 00:00:00 2001 From: BobTheBob9 Date: Sun, 24 Jul 2022 20:55:34 +0100 Subject: add new memory lib --- NorthstarDLL/chatcommand.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'NorthstarDLL/chatcommand.cpp') diff --git a/NorthstarDLL/chatcommand.cpp b/NorthstarDLL/chatcommand.cpp index 2973711c..e0530dd5 100644 --- a/NorthstarDLL/chatcommand.cpp +++ b/NorthstarDLL/chatcommand.cpp @@ -28,9 +28,9 @@ void ConCommand_log(const CCommand& args) } } -ON_DLL_LOAD_CLIENT_RELIESON("engine.dll", ClientChatCommand, ConCommand, (HMODULE baseAddress)) +ON_DLL_LOAD_CLIENT_RELIESON("engine.dll", ClientChatCommand, ConCommand, (CModule module)) { - ClientSayText = (ClientSayTextType)((char*)baseAddress + 0x54780); + ClientSayText = module.Offset(0x54780).As(); RegisterConCommand("say", ConCommand_say, "Enters a message in public chat", FCVAR_CLIENTDLL); RegisterConCommand("say_team", ConCommand_say_team, "Enters a message in team chat", FCVAR_CLIENTDLL); RegisterConCommand("log", ConCommand_log, "Log a message to the local chat window", FCVAR_CLIENTDLL); -- cgit v1.2.3